aboutsummaryrefslogtreecommitdiff
path: root/project/src/ui
diff options
context:
space:
mode:
authorroot <root@dc13.lemmi>2020-07-21 10:00:46 +0200
committerroot <root@dc13.lemmi>2020-07-21 10:00:46 +0200
commit1192c4575ea7afdf38e3fa0df4587a08620af11e (patch)
tree6910a62487c282d0840d2e668aa7eb40b7c8a3fd /project/src/ui
parent76de8a89f7c1d1b4522eb66e8f89d248e8c1781f (diff)
SZS v2.18a
Diffstat (limited to '')
-rw-r--r--project/src/ui/gen-ui.c185
-rw-r--r--project/src/ui/tab-wbmgt.inc605
-rw-r--r--project/src/ui/tab-wctct.inc780
-rw-r--r--project/src/ui/tab-wimgt.inc497
-rw-r--r--project/src/ui/tab-wkclt.inc793
-rw-r--r--project/src/ui/tab-wkmpt.inc932
-rw-r--r--project/src/ui/tab-wlect.inc837
-rw-r--r--project/src/ui/tab-wmdlt.inc600
-rw-r--r--project/src/ui/tab-wpatt.inc441
-rw-r--r--project/src/ui/tab-wstrt.inc1038
-rw-r--r--project/src/ui/tab-wszst.inc3238
-rw-r--r--project/src/ui/ui-wbmgt.c1695
-rw-r--r--project/src/ui/ui-wbmgt.h417
-rw-r--r--project/src/ui/ui-wctct.c1952
-rw-r--r--project/src/ui/ui-wctct.h505
-rw-r--r--project/src/ui/ui-wimgt.c1400
-rw-r--r--project/src/ui/ui-wimgt.h348
-rw-r--r--project/src/ui/ui-wkclt.c2482
-rw-r--r--project/src/ui/ui-wkclt.h481
-rw-r--r--project/src/ui/ui-wkmpt.c2661
-rw-r--r--project/src/ui/ui-wkmpt.h536
-rw-r--r--project/src/ui/ui-wlect.c1865
-rw-r--r--project/src/ui/ui-wlect.h451
-rw-r--r--project/src/ui/ui-wmdlt.c1756
-rw-r--r--project/src/ui/ui-wmdlt.h417
-rw-r--r--project/src/ui/ui-wpatt.c1228
-rw-r--r--project/src/ui/ui-wpatt.h324
-rw-r--r--project/src/ui/ui-wstrt.c2207
-rw-r--r--project/src/ui/ui-wstrt.h560
-rw-r--r--project/src/ui/ui-wszst.c7805
-rw-r--r--project/src/ui/ui-wszst.h1226
-rw-r--r--project/src/ui/ui.def23034
-rw-r--r--project/src/ui/ui.h50
33 files changed, 63346 insertions, 0 deletions
diff --git a/project/src/ui/gen-ui.c b/project/src/ui/gen-ui.c
new file mode 100644
index 0000000..823595c
--- /dev/null
+++ b/project/src/ui/gen-ui.c
@@ -0,0 +1,185 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+#define _GNU_SOURCE 1
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "lib-std.h"
+#include "lib-bmg.h"
+#include "lib-ctcode.h"
+#include "dclib-basics.h"
+#include "dclib-xdump.h"
+#include "dclib-debug.h"
+#include "ui.h" // [[dclib]] wrapper
+#include "dclib-ui.h"
+#include "version.h"
+
+#include "dclib-gen-ui.h"
+#include "ui-head.inc"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// functions not neded by gen-ui ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+bool DefineIntVar ( VarMap_t * vm, ccp varname, int value ) { return false; }
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// some helper macros ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#define UI_TO_TEXT(x) UI_TO_TEXT1(x)
+#define UI_TO_TEXT1(x) #x
+
+#define ARCHIVES_OR "SZS, U8, PACK, BRRES, BREFF, BREFT or RARC"
+#define ARCHIVES_AND "SZS, U8, PACK, BRRES, BREFF, BREFT and RARC"
+#define ARCHIVES_COMMA "SZS, U8, PACK, BRRES, BREFF, BREFT, RARC"
+
+#define MAX_GAMEMODES "1573"
+
+#define NO_HEAD_SYNTAX "Suppress the syntax information section in decoded text files."
+
+#define PATCH_BMG_TEXT(x) \
+ "This option specifies a BMG patch mode." \
+ " Some of the modes need a parameter or a file name of a BMG patch file" \
+ " (raw or text BMG), both separated by an equal sign." \
+ " Modes with required file names are @PRINT, REPLACE, INSERT," \
+ " OVERWRITE, DELETE, MASK, EQUAL@ and @NOTEQUAL@." \
+ " Modes with text parameter are @FORMAT@, @REGEXP@ and @RM-REGEXP@. " \
+ " Standalone modes are @ID, ID-ALL, UNICODE, RM-ESCAPES, RM-CUPS," \
+ " CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY, LE-FILL," \
+ " X-COPY, X-FORCE-COPY@ and @X-FILL@." \
+ " Unique abbreviations are allowed." \
+ "\n " \
+ " The optional condition @COND@ is either '@?MID@' or '@!MID@'." \
+ " In case of '@?MID@', the patch is only applied" \
+ " if the message id MID already exists." \
+ " In case of '@!MID@', the patch is only applied" \
+ " if the message id MID does not exists." \
+ "\n " \
+ " If this option is used multiple times," \
+ " all patch files will be processed in the entered order." \
+ x \
+ "\1 Read https://szs.wiimm.de/opt/patch-bmg for more details."
+
+#define BMG_BRIEF_TEXT \
+ "If set, the information header in decoded text files" \
+ " is suppressed (for historical reasons same as {--no-header})." \
+ " If set at least twice, all comments are suppressed" \
+ " and the output is packed without empty lines." \
+ " If set 3 times, the @#BMG@ file indentification is also suppressed."
+
+#define BMG_LONG_TEXT \
+ "Print long numeric message IDs instead of" \
+ " alternative message names like Txx, Uxx or Mxx."
+
+#define OPT_POINTS \
+ "defines a new table for the points assigned to players after" \
+ " a versus or room race." \
+ " The parameter is a blank or comma and slash (next row) separated list" \
+ " with numbers (points) between 0 and 255 and the following keywords:" \
+ " @NINTENDO, LINEAR, WIN, WIN15, WIN25@ to select a predefined table;" \
+ " @NO-BONUS, BONUS, NULL, ONE@ as options;" \
+ " @N1..N12@ to select the row for N players." \
+ "\1 See https://szs.wiimm.de/opt/points for details."
+
+#define OPT_CT_DIR(x) \
+ "Define a search directory for CT-CODE parts and use the internal" \
+ " copies only, if no valid file is found." \
+ " Each file is searched without and then with extension '.bz2'." \
+ " For both cases bzip2 files are detected and decompressed." \
+ " Only files with correct file type are accepted." \
+ x \
+ "\n " \
+ " Use this option multiple times to define more than one search directory."
+
+#define FUNCTION_BRIEF \
+ "Suppress the output of the description and print only function type and syntax."
+
+#define FUNCTION_LONG \
+ "Usually only the function syntax is compared to the keywords." \
+ " But if --long is set, the descriptions are compared too."
+
+#define CT_CODE_SOURCE \
+ "BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN"
+
+#define DEPRECATED "[DEPRECATED] "
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// the info table ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+info_t info_tab[] =
+{
+ #include "tab-wszst.inc"
+ #include "tab-wbmgt.inc"
+ #include "tab-wctct.inc"
+ #include "tab-wimgt.inc"
+ #include "tab-wkclt.inc"
+ #include "tab-wkmpt.inc"
+ #include "tab-wlect.inc"
+ #include "tab-wmdlt.inc"
+ #include "tab-wpatt.inc"
+ #include "tab-wstrt.inc"
+
+ { T_END, 0,0,0,0 }
+};
+
+#include "dclib-gen-ui.inc"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// main() ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+int main ( int argc, char ** argv )
+{
+ return ui_main(argc,argv);
+}
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/tab-wbmgt.inc b/project/src/ui/tab-wbmgt.inc
new file mode 100644
index 0000000..86eb2ba
--- /dev/null
+++ b/project/src/ui/tab-wbmgt.inc
@@ -0,0 +1,605 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wbmgt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wbmgt", 0,
+ "wbmgt [option]... command [option|parameter|@file]...",
+ WBMGT_LONG " :"
+ " Convert and patch raw and text BMG (message) files." },
+
+ //
+ //---------- list of all wbmgt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wbmgt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wbmgt HELP [--width=wd] OPT|OPTION ...\n"
+ "wbmgt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wbmgt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wbmgt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wbmgt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wbmgt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wbmgt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wbmgt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wbmgt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wbmgt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "POINTS", "POINTS|PTS",
+ "wbmgt POINTS [--points=list]",
+ "Print a table with the points assigned to player after"
+ " a versus or room race." },
+
+ { T_DEF_CMD, "REGEXP", "REGEXP|RE",
+ "wbmgt REGEXP pattern string...",
+ "Test implementation of regular expressions."
+ " PATTERN is the regular expression to find matches."
+ " Each STRING is object of the match and replace operation." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "EXTRACT", "EXTRACT",
+ "wbmgt EXTRACT name source",
+ "Extract BMG section NAME of file SOURCE and write"
+ " the binary data to standard output."
+ " If NAME consists of less than 4 characters, then the first"
+ " section that starts with these characters is dumped." },
+
+ { T_DEF_CMD, "SECTIONS", "SECTIONS",
+ "wbmgt SECTIONS [source]...",
+ "List all sections of each binary BMG file."
+ " Print offset, size, magic and a short info."
+ " If known, print number and size of elements too." },
+
+ { T_DEF_CMD, "LIST", "LIST|LS|LL",
+ "wbmgt LIST [source]...",
+ "List messages to proof the content."
+ " Patches are applied before listing."
+ " The lines are cut to fit the terminal width." },
+
+ { T_DEF_CMD, "SLOTS", "SLOTS",
+ "wbmgt SLOTS [source]...",
+ "Print a slot ordered list with slot number, message id,"
+ " delta and attributes. Patches are applied before listing." },
+
+ { T_DEF_CMD, "DIFF", "DIFF|CMP",
+ "wbmgt DIFF source1 source2\n"
+ "wbmgt DIFF source... --dest dest\n",
+ "Compare two or more BMG (raw or text) files"
+ " on string level and report mismatches for each string."
+ " If option {--dest} is set, then each source file"
+ " is compared with a file in the destination."
+ " Patches are applied to all sources before comparing." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wbmgt CAT [source]...",
+ "Read the entered BMG files (text, binary or szs sub file) and print"
+ " them as decoded text files to standard output."
+ " All BMG files of a single archive (SZS,...) are combined to 1 source."
+ " The output of all source files is concatenated." },
+
+ { T_DEF_CMD, "MIX", "MIX",
+ "wbmgt MIX [source]...",
+ "Read the entered BMG files (text, binary or szs sub file) and print"
+ " them as decoded text files to standard output."
+ " All BMG files of all archives (SZS,...) are read."
+ " The output of all source files is combined"
+ " and strings of later source files override prior defined strings." },
+
+ { T_DEF_CMD, "IDENTIFIER", "IDENTIFIER|ID|IDENTIFY",
+ "wbmgt IDENTIFIER",
+ "Create a simple text BMG with the identifier message @3DEF@ only"
+ " with respect to options {--le-code} and {--ct-code}."
+ " Print the result to standard output." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wbmgt DECODE [szs]...",
+ "Read the entered message files and decode them to text files."
+ " All BMG files of a single archive (SZS,...) are concatenated to 1 source."
+ " This command is similar to {PATCH},"
+ " but the result is always decoded."
+ " The default destination is @'%P/%N.txt'@." },
+
+ { T_DEF_CMD, "ENCODE", "ENCODE|ENC",
+ "wbmgt ENCODE [source]...",
+ "Read the entered message files and encode them to BMG files."
+ " All BMG files of a single archive (SZS,...) are concatenated to 1 source."
+ " This command is similar to {PATCH},"
+ " but the result is always encoded."
+ " The default destination is @'%P/%N.bmg'@." },
+
+ { T_DEF_CMD, "PATCH", "PATCH|PAT",
+ "wbmgt PATCH [source]...",
+ "Patch the entered files by using the patch list"
+ " specified by option {--patch-bmg}."
+ " The coding of the source files is not changed."
+ " The default destination is @'%P/%F'@."
+ "\n "
+ " Use {wszst patch --patch-bmg ...} to patch BMG files within a SZS file."},
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ //
+ //---------- list of all wbmgt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, BMG_LONG_TEXT },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, "Suppress the syntax information section in BMG text files." },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0, BMG_BRIEF_TEXT },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TRACKS", "T|tracks",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "ARENAS", "A|arenas",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "POINTS", "points|pts",
+ "list",
+ "This option creates the new message 3FF0 to hold"
+ " a description of the versus points table."
+ " It " OPT_POINTS },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ALIGN", "align",
+ "size",
+ "Define an align value for the sub sections in the archive."
+ " The value must be a power of 2 and the default value is 32 (0x20)" },
+
+ { T_OPT_CMP, "PATCH_BMG", "P|patch-bmg|patchbmg|pb|patch",
+ "mode[cond][=param]",
+ PATCH_BMG_TEXT(" @--patch@ is a short cut.") },
+
+ { T_OPT_CMP, "MACRO_BMG", "macro-bmg|macrobmg|mb",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CMP, "FILTER_BMG", "filter-bmg|filterbmg|fb|msg",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "BMG_ENCODING", "encoding|bmg-encoding|bmgencoding",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "BMG_INF_SIZE", "inf-size|infsize|bmg-inf-size|bmginfsize",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CO, "BMG_MID", "bmg-mid|bmgmid",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "FORCE_ATTRIB", "force-attrib|forceattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEF_ATTRIB", "def-attrib|defattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ATTRIB", "no-attrib|noattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "X_ESCAPES", "x-escapes|xescapes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OLD_ESCAPES", "old-escapes|oldescapes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "SINGLE_LINE", "1|single-line|singleline",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_BMG_COLORS","no-bmg-colors|nobmgcolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BMG_COLORS", "bmg-colors|bmgcolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_BMG_INLINE","no-bmg-inline|nobmginline",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "EXPORT", "X|export",
+ 0,
+ "Enable the export mode and create small and machine readable text files"
+ " for easy post processing."
+ " The option works similar like @-HBl11@ for BMG text files." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wbmgt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //
+ //---------- wbmgt GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "BMG_ENCODING", 0,0,0 },
+ { T_COPT, "BMG_INF_SIZE", 0,0,0 },
+ { T_COPT, "BMG_MID", 0,0,0 },
+ { T_COPT, "FORCE_ATTRIB", 0,0,0 },
+ { T_COPT, "DEF_ATTRIB", 0,0,0 },
+ { T_COPT, "NO_ATTRIB", 0,0,0 },
+ { T_COPT, "X_ESCAPES", 0,0,0 },
+ { T_COPT, "OLD_ESCAPES", 0,0,0 },
+ { T_COPT, "SINGLE_LINE", 0,0,0 },
+ { T_COPT, "NO_BMG_COLORS",0,0,0 },
+ { T_COPT, "BMG_COLORS", 0,0,0 },
+ { T_COPT, "NO_BMG_INLINE",0,0,0 },
+ { T_COPT, "LONG", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+
+ //
+ //---------- COMMAND wbmgt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wbmgt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wbmgt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wbmgt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wbmgt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wbmgt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wbmgt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wbmgt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wbmgt POINTS ----------
+
+ { T_CMD_BEG, "POINTS", 0,0,0 },
+ { T_COPT, "POINTS", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print the table as comma separated lists in C notation." },
+ { T_COPT, "LONG", 0,0,
+ "Append a string in {--points} format that defines the table."
+ " If set twice, append up to 3 strings in different modes." },
+
+ //---------- COMMAND wbmgt REGEXP ----------
+
+ { T_CMD_BEG, "REGEXP", 0,0,0 },
+
+ //---------- COMMAND wbmgt EXTRACT ----------
+
+ { T_CMD_BEG, "EXTRACT", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Exclude the section header from output." },
+
+ //---------- COMMAND wbmgt SECTIONS ----------
+
+ { T_CMD_BEG, "SECTIONS", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wbmgt LIST ----------
+
+ { T_CMD_BEG, "LIST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+
+ //---------- COMMAND wbmgt SLOTS ----------
+
+ { T_CMD_BEG, "SLOTS", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+
+ //---------- COMMAND wbmgt DIFF ----------
+
+ { T_CMD_BEG, "DIFF", 0,0,0 },
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+
+ //---------- COMMAND wbmgt CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+
+ //---------- COMMAND wbmgt MIX ----------
+
+ { T_CMD_BEG, "MIX", 0,0,0 },
+ { T_COPY_CMD, "CAT", 0,0,0 },
+
+ //---------- COMMAND wbmgt IDENTIFIER ----------
+
+ { T_CMD_BEG, "IDENTIFIER", 0,0,0 },
+ { T_COPT, "LE_CODE", 0,0,0 },
+ { T_COPT, "CT_CODE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+
+ //---------- COMMAND wbmgt DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+
+ //---------- COMMAND wbmgt ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "BMG_ENCODING", 0,0,0 },
+ { T_COPT, "BMG_INF_SIZE", 0,0,0 },
+ { T_COPT, "BMG_MID", 0,0,0 },
+ { T_COPT, "FORCE_ATTRIB", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+ { T_COPT, "ALIGN", 0,0,0 },
+
+ //---------- COMMAND wbmgt PATCH ----------
+
+ { T_CMD_BEG, "PATCH", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+ { T_COPT, "ALIGN", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wctct.inc b/project/src/ui/tab-wctct.inc
new file mode 100644
index 0000000..1a4c166
--- /dev/null
+++ b/project/src/ui/tab-wctct.inc
@@ -0,0 +1,780 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wctct /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wctct", 0,
+ "wctct [option]... command [option|parameter|@file]...",
+ WCTCT_LONG " :"
+ " Manage the $CT-CODE$ extension."
+ " " CT_CODE_SOURCE " files are accepted as input." },
+
+ //
+ //---------- list of all wctct commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wctct VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wctct HELP [--width=wd] OPT|OPTION ...\n"
+ "wctct HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wctct HELP [--width=wd] command [-b] [ignored]...\n"
+ "wctct HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wctct ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wctct TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wctct COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wctct ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wctct FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wctct FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wctct SYMBOLS",
+ "Print predefined symbols of text parser to standard output."
+ " The CT-CODE specific symbols are included." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wctct FUNCTIONS [key]...",
+ "Print a list with all parser functions including"
+ " the CT-CODE specific functions."
+ " If one key ore more key entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wctct CALCULATE expression...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wctct FLOAT number...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output."
+ " Use keyword @HELP@ to get a list of possible keywords." },
+
+ { H_DEF_CMD, "RAWDUMP", "_RAWDUMP",
+ "wszst _RAWDUMP [-d|-D] destdir",
+ "This hidden command creates the destination directory "
+ " and create several files as copy of internal data." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "DUMP", "D|DUMP",
+ "wctct DUMP [source]...",
+ "Print an information dump for the CT-CODE of each source file."
+ " " CT_CODE_SOURCE " are accepted as input." },
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wctct CAT [source]...",
+ "Read the source files and print the CT-CODE part"
+ " them as decoded text files to standard output."
+ " The output of all source files is concatenated."
+ " " CT_CODE_SOURCE " are accepted as input." },
+
+ { T_DEF_CMD, "BMG", "BMG",
+ "wctct BMG [source]...",
+ "Read the source files and print a BMG message listing to standard output."
+ " " CT_CODE_SOURCE " are accepted as input." },
+
+ { T_DEF_CMD, "TRACKS", "TRACKS",
+ "wctct TRACKS [source]...",
+ "Read the source files and print a track listing to standard output."
+ " " CT_CODE_SOURCE " are accepted as input." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wctct DECODE [source]...",
+ "Read the source files and decode them to CT-TEXT files."
+ " The default destination is @'%P/%N.txt'@."
+ " " CT_CODE_SOURCE " are accepted as input." },
+
+ { T_DEF_CMD, "CREATE", "CREATE|C",
+ "wctct CREATE keyword [source]...",
+ "Read the source files, scan the CT-CODE part"
+ " and create an output file controlled by the keyword."
+ " BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN files are accepted as input."
+ " Possible keywords are: @CUP1, CRS1, r-MOD1, r-MOD2, r-OVR1,"
+ " r-BAD1CODE, r-BAD1DATA (=r-CODE), r-TEX0, r-BRRES, r-SZS,"
+ " BMG, TRACKS, LIST, REF@ and @FULL@."
+ " 'r' defines the region and is one of"
+ " @EU, RMCP, US, RMCE, JP, RMCJ, KO@ or @RMCK@."
+ "\n "
+ " The Korean support needs external CT-CODE files."
+ " Use option {--ct-dir} to define at least one search path." },
+
+ { T_DEF_CMD, "PATCH", "PATCH|P",
+ "wctct PATCH [source]...",
+ "Read each source file, find and scan the CT-CODE part"
+ " and patch it."
+ " " CT_CODE_SOURCE " are accepted as input." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ //
+ //---------- list of all wctct options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "OLD_SPINY", "old-spiny|oldspiny",
+ 0,
+ "Disable the new feature to hold a Spiny Shell at the tail."
+ "\1 https://szs.wiimm.de/opt/ctcode for details." },
+
+ { T_OPT_GP, "CRS1", "crs1",
+ "value",
+ "Store this value into all 8 members of the property array"
+ " of the CRS1 header if reading a CT-TEXT."
+ " The default value is 0x800." },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ROUND", "round",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0,
+ "Suppress cross reference comments." },
+
+ { T_OPT_C, "RAW", "raw",
+ 0,
+ "Print BMG messages as UTF-8 text without escape sequences." },
+
+ { T_OPT_CP, "BMG_ENCODING", "bmg-encoding|bmgencoding",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "BMG_INF_SIZE", "bmg-inf-size|bmginfsize",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CO, "BMG_MID", "bmg-mid|bmgmid",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "FORCE_ATTRIB", "force-attrib|forceattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEF_ATTRIB", "def-attrib|defattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ATTRIB", "no-attrib|noattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "X_ESCAPES", "x-escapes|xescapes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OLD_ESCAPES", "old-escapes|oldescapes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "SINGLE_LINE", "1|single-line|singleline",
+ 0,
+ "If set, don't print continuation lines for BMG text output."
+ " If set twice, print only single text lines but not value lines." },
+
+ { T_OPT_C, "NO_BMG_COLORS","no-bmg-colors|nobmgcolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BMG_COLORS", "bmg-colors|bmgcolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_BMG_INLINE","no-bmg-inline|nobmginline",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "EXPORT", "X|export",
+ 0,
+ "Enable the export mode and create small and machine readable text files"
+ " for easy post processing."
+ " The option works similar like @-HB@ for CT-CODE output." },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_CHECK", "N|no-check|nocheck",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "TRACKS", "T|tracks",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "ARENAS", "A|arenas",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "LIST", "list",
+ 0,
+ "Cancel all previous {--rel} and {--full}"
+ " and enter LIST mode (default) for text output."
+ "\n "
+ " In LIST mode only a track list is generated."
+ " On scanning the tracks are automatically distributed to the cups."
+ " This makes rearanging very simple." },
+
+ { T_OPT_C, "REF", "ref",
+ 0,
+ "Cancel all previous {--list} and {--full}"
+ " and enter REFERENCE mode for text output."
+ "\n "
+ " In REFERENCE mode all tracks and cups are printed separately."
+ " After scanning the cup and track layout is the same"
+ " as the original code file." },
+
+ { T_OPT_C, "FULL", "full",
+ 0,
+ "Cancel all previous {--list} and {--rel}"
+ " and enter FULL mode for text output."
+ "\n "
+ " FULL mode is a combination of LIST and REF modes." },
+
+ { T_OPT_C, "HEX", "hex",
+ 0,
+ "Normally and if available, names are printed for music and property"
+ " slots. If this option is set, hex numbers are printed always." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GP, "CT_DIR", "ct-dir|ctdir",
+ "dir",
+ OPT_CT_DIR("\n wctct will search in the sub directory @'rmc[pujk]/'@" \
+ " for files @'mod1.bin', 'mod2.bin', 'ovr1.bin'@" \
+ " and @'bad1code.bin'@.") },
+
+ { T_OPT_GO, "CT_LOG", "ct-log|ctlog",
+ "[=level]",
+ "Define a log level for option {--ct-dir}."
+ " Without parameter, the current level is increased."
+ " Allowed keywords are: 0=0FF, 1=SUCCESS, 2=FOUND, 3=ALL" },
+
+ { T_OPT_GP, "ALLOW_SLOTS", "allow-slots|allowslots",
+ "list",
+ "Allow and disallow slots for automatic slot assigning."
+ " A comma separated list of slots (A), slot ranges (A:B) or keywords"
+ " is expected. If preceded by a minus sign, the slots are disabled."
+ " The keywords are: @TRACKS@ (slots 0:0x1f), @ARENAS@ (0x20:0x29)"
+ " and @SPECIAL@ (0x36:0x3a)."
+ " @CTCODE@ is an abbreviation for @ARENAS,SPECIAL@."
+ "\n "
+ " The default is to enable slot ranges"
+ " @0x00:0x1f@, @0x2a:0x35@, @0x3b:0x41@ and @0x44:0xfe@." },
+
+ { T_OPT_CP, "IMAGES", "images",
+ "dir",
+ "If creating a CT-CODE BRRES or SZS file,"
+ " then search the 8 strap images in the specified directory."
+ " The images are searched with extensions .png, .tex, .tex0"
+ " and without extension in this order until a valid image is found."
+ " All images will be resized to the correct width and height "
+ " and converted to format TEX.RGB565 without mipmaps."
+ " If no valid image is found, a hard coded default image is used." },
+
+ { T_OPT_CMP, "LOAD_BMG", "load-bmg|loadbmg",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CMP, "PATCH_BMG", "patch-bmg|patchbmg|pb",
+ "mode[cond][=param]",
+ PATCH_BMG_TEXT("") },
+
+ { T_OPT_CMP, "MACRO_BMG", "macro-bmg|macrobmg|mb",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CMP, "FILTER_BMG", "filter-bmg|filterbmg|fb",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PATCH_NAMES", "patch-names|patchnames",
+ 0,
+ "If set, the names of the CUP1 and CSR1 sections are patched "
+ " by the loaded BMG files directly after loading the source files." },
+
+ { T_OPT_CP, "ORDER_BY", "order-by|orderby|order",
+ "bmg",
+ "Load the BMG file and filter track names."
+ " Then before creating output files,"
+ " re-distribute the tracks of the additonal cups (9-)"
+ " to the same cups by the order of the read track names."
+ " Tracks without BMG reference are placed at the end of all tracks."
+ " This option modifes only the track order of the cups,"
+ " but will not change any name." },
+
+ { T_OPT_C, "ORDER_ALL", "order-all|orderall",
+ 0,
+ "Used together with option {--order-by}:"
+ " Re-distribute the tracks of all cups beginning with Mushroom Cup." },
+
+ { H_OPT_C, "DYNAMIC", "dynamic",
+ 0,
+ "Enable dynamic length calculation for the @CTGP_CODE@ part."
+ " The surrounding TEX and BRRES files are also adjusted."
+ " The usage of this option is EXPERIMENTAL." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "WRITE_TRACKS", "write-tracks|writetracks|wtracks",
+ "file",
+ "Create a machine readable file reflecting"
+ " the racing track distribution to the cups."
+ " One line of format @'IDX|MID|NAME'@ is written for each track."
+ " --wtracks is a short cut." },
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wctct GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "WRITE_TRACKS", 0,0,0 },
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //---------- wctct GROUP PATCH ----------
+
+ { T_GRP_BEG, "PATCH", 0,0,0 },
+
+ { T_COPT, "LOAD_BMG", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+ { T_COPT, "PATCH_NAMES", 0,0,0 },
+ { T_COPT, "ORDER_BY", 0,0,0 },
+ { T_COPT, "ORDER_ALL", 0,0,0 },
+ //{ T_COPT, "TRACKS", 0,0,0 },
+ //{ T_COPT, "ARENAS", 0,0,0 },
+
+ //---------- wctct GROUP TEXTOPT ----------
+
+ { T_GRP_BEG, "TEXTOPT", 0,0,0 },
+
+ { T_COPT, "HEX", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the syntax information section in CTC text files." },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+
+ //---------- wctct GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "LIST", 0,0,0 },
+ { T_COPT, "REF", 0,0,0 },
+ { T_COPT, "FULL", 0,0,0 },
+ { T_COPY_GRP, "TEXTOPT", 0,0,0 },
+
+ //
+ //---------- COMMAND wctct VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wctct HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wctct ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wctct TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wctct COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wctct ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wctct FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wctct FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wctct SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wctct FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wctct CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wctct FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wctct _EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wctct _RAWDUMP ----------
+
+ { T_CMD_BEG, "RAWDUMP", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+
+ //---------- COMMAND wctct DUMP ----------
+
+ { T_CMD_BEG, "DUMP", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print headers as hexdump." },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wctct BMG ----------
+
+ { T_CMD_BEG, "BMG", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Filter the message by tracks, that are used a racing track."
+ " If set twice, suppress also tracks created by the 'N' command"
+ " of CT-TEXT files."
+ " If set 3 times, suppress always the output of first 32 tracks." },
+ { T_COPT, "LONG", 0,0,
+ "Normally, only the track and arena names are exported."
+ " The message id (MID) range is 4000-40FF."
+ " If set, cup names are exported too as MID 4200-423F."
+ " If set twice, cup/track relations are also exported as MID 4300-43FF."},
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "BMG_ENCODING", 0,0,0 },
+ { T_COPT, "BMG_INF_SIZE", 0,0,0 },
+ { T_COPT, "BMG_MID", 0,0,0 },
+ { T_COPT, "FORCE_ATTRIB", 0,0,0 },
+ { T_COPT, "DEF_ATTRIB", 0,0,0 },
+ { T_COPT, "NO_ATTRIB", 0,0,0 },
+ { T_COPT, "X_ESCAPES", 0,0,0 },
+ { T_COPT, "OLD_ESCAPES", 0,0,0 },
+ { T_COPT, "SINGLE_LINE", 0,0,0 },
+ { T_COPT, "NO_BMG_COLORS",0,0,0 },
+ { T_COPT, "BMG_COLORS", 0,0,0 },
+ { T_COPT, "NO_BMG_INLINE",0,0,0 },
+ { T_COPT, "WRITE_TRACKS", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wctct TRACKS ----------
+
+ { T_CMD_BEG, "TRACKS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the table header." },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress the output of the music and property slots." },
+ { T_COPT, "LONG", 0,0,
+ "Include the first 32 standard tracks into the output."
+ " If set twice, also include the battle arenas." },
+ { T_COPT, "RAW", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "WRITE_TRACKS", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wctct CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "WRITE_TRACKS", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wctct DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wctct CREATE ----------
+
+ { T_CMD_BEG, "CREATE", 0,0,0 },
+
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "TEXTOPT", 0,0,0 },
+ { T_COPT, "BMG_ENCODING", 0,0,0 },
+ { T_COPT, "BMG_INF_SIZE", 0,0,0 },
+ { T_COPT, "BMG_MID", 0,0,0 },
+ { T_COPT, "FORCE_ATTRIB", 0,0,0 },
+ { T_COPT, "DEF_ATTRIB", 0,0,0 },
+ { T_COPT, "NO_ATTRIB", 0,0,0 },
+ { T_COPT, "X_ESCAPES", 0,0,0 },
+ { T_COPT, "OLD_ESCAPES", 0,0,0 },
+ { T_COPT, "SINGLE_LINE", 0,0,0 },
+ { T_COPT, "NO_BMG_COLORS",0,0,0 },
+ { T_COPT, "BMG_COLORS", 0,0,0 },
+ { T_COPT, "NO_BMG_INLINE",0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "BMG: Filter the message by tracks, that are used a racing track."
+ " If set twice, suppress also tracks created by the 'N' command"
+ " of CT-TEXT files."
+ " If set 3 times, suppress always the output of first 32 tracks." },
+ { T_COPT, "LONG", 0,0,
+ "BMG: Normally, only the track and arena names are exported."
+ " The message id (MID) range is 4000-40FF."
+ " If set, cup names are exported too as MID 4200-423F."
+ " If set twice, cup/track relations are also exported as MID 4300-43FF."},
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "CT_DIR", 0,0,0 },
+ { T_COPT, "CT_LOG", 0,0,0 },
+ { T_COPT, "ALLOW_SLOTS", 0,0,0 },
+ { T_COPT, "IMAGES", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { H_COPT, "DYNAMIC", 0,0,0 },
+
+ //---------- COMMAND wctct PATCH ----------
+
+ { T_CMD_BEG, "PATCH", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wimgt.inc b/project/src/ui/tab-wimgt.inc
new file mode 100644
index 0000000..2d6286a
--- /dev/null
+++ b/project/src/ui/tab-wimgt.inc
@@ -0,0 +1,497 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wimgt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wimgt", 0,
+ "wimgt [option]... command [option|parameter|@file]...",
+ WIMGT_LONG " :"
+ " Extract and convert graphic images."
+ " The file formats TPL, TEX, BTI, BREFT and PNG are supported." },
+
+ //
+ //---------- list of all wimgt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wimgt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wimgt HELP [--width=wd] OPT|OPTION ...\n"
+ "wimgt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wimgt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wimgt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wimgt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wimgt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wimgt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wimgt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wimgt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wimgt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "LIST", "LIST|LS",
+ "wimgt LIST [source]...",
+ "List images files and print file and image type." },
+
+ { T_DEF_CMD, "LIST_L", "LIST-L|LL|LISTL",
+ "wit LIST-L [source]...",
+ "List images files and print file and image type"
+ " and geometry data."
+ " 'LIST-L' is a short cut for {LIST --long}." },
+
+ { T_DEF_CMD, "LIST_LL", "LIST-LL|LLL|LISTLL",
+ "wit LIST-LL [source]...",
+ "List images files and print file and image type"
+ " and advanced geometry data."
+ " 'LIST-LL' is a short cut for {LIST --long --long}." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { 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'@." },
+
+ { 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)." },
+
+ { 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." },
+
+ { T_DEF_CMD, "COPY", "COPY|CP",
+ "wimgt COPY source dest\n"
+ "wimgt COPY source... [-d|-D] dest",
+ "Copy and convert an image from 'source' to 'dest'."
+ " Multiple sources can be used, if 'dest' is a directory"
+ " or contains at least one %-pattern."
+ "\n "
+ " 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." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ //
+ //---------- list of all wimgt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0,
+ "Create smaller output." },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "TRACKS", "T|tracks",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "ARENAS", "A|arenas",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ALL", "a|all",
+ 0,
+ "Convert all files and not only the files with changed file"
+ " or image formats." },
+
+ { T_OPT_C, "MIPMAPS", "mipmaps",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_MIPMAPS", "no-mipmaps|nomipmaps|no-mm|nomm",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "N_MIPMAPS", "n-mipmaps|nmipmaps|n-mm|nmm",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "MAX_MIPMAPS", "max-mipmaps|maxmipmaps|max-mm|maxmm",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "MIPMAP_SIZE", "mipmap-size|mipmapsize|mm-size|mmsize",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "FAST_MIPMAPS", "fast-mipmaps|fastmipmaps|fast-mm|fastmm",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "CMPR_DEFAULT", "cmpr-default",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRE_CONVERT", "pre-convert|preconvert",
+ 0,
+ "Convert the image before the image format for the destination file"
+ " is selected. This results in a perhaps worser graphic"
+ " and is only useful to control graphic conversions." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CMP, "PATCH", "P|patch",
+ "mode1.mode2...=file",
+ "This option specifies patch mode list and a file,"
+ " separated by an equal sign."
+ " Mode is a point separated list of the keywords:"
+ " @TOP@ (@T@), @BOTTOM@ (@B@), @VCENTER@ (@V@), @INS-TOP@ (@IT@)"
+ " and @INS-BOTTOM@ (@IB@) for the vertical alignment,"
+ " @LEFT@ (@L@), @RIGHT@ (@R@), @HCENTER@ (@H@), @INS-LEFT@ (@IL@)"
+ " and @INS-RIGHT@ (@IR@) for the horizontal alignment,"
+ " @COPY@ (@CP@), @BACKGROUND@ (@BG@), @FOREGROUND@ (@FG@)"
+ " and @MIX@ (@MX@) as color calculation 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." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "TRANSFORM", "x|transform",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "STRIP", "strip",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wimgt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //---------- wimgt GROUP CONVERT ----------
+
+ { T_GRP_BEG, "TRANSFORM", 0,0,0 },
+
+ { T_COPT, "N_MIPMAPS", 0,0,0 },
+ { T_COPT, "MAX_MIPMAPS", 0,0,0 },
+ { T_COPT, "MIPMAP_SIZE", 0,0,0 },
+ { T_COPT, "PRE_CONVERT", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "PATCH", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "MIPMAPS", 0,0,0 },
+ { T_COPT, "NO_MIPMAPS", 0,0,0 },
+ { T_COPT, "FAST_MIPMAPS", 0,0,0 },
+ { T_COPT, "CMPR_DEFAULT", 0,0,0 },
+ { T_COPT, "TRANSFORM", 0,0,0 },
+ { T_COPT, "STRIP", 0,0,0 },
+
+ //
+ //---------- COMMAND wimgt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wimgt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wimgt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wimgt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wimgt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wimgt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wimgt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wimgt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wimgt LIST ----------
+
+ { T_CMD_BEG, "LIST", 0,0,0 },
+ { T_COPT_M, "LONG", 0,0,
+ "If set, geometry data of the image is printed."
+ " If set twice, advanced geometry data is printed." },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-L ----------
+
+ { T_CMD_BEG, "LIST_L", 0,0,0 },
+ { T_COPY_CMD, "LIST", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-LL ----------
+
+ { T_CMD_BEG, "LIST_LL", 0,0,0 },
+ { T_COPY_CMD, "LIST_L", 0,0,0 },
+
+ //---------- COMMAND wimgt DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wimgt ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "ALL", 0,0,
+ "If source and destination file are the same,"
+ " the file is only written on modifications (transform, patch, ...)."
+ " If --all is set, then the file is always written." },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wimgt CONVERT ----------
+
+ { T_CMD_BEG, "CONVERT", 0,0,0 },
+ { T_COPY_CMD, "ENCODE", 0,0,0 },
+
+ //---------- COMMAND wimgt COPY ----------
+
+ { T_CMD_BEG, "COPY", 0,0,0 },
+ { T_COPY_CMD, "ENCODE", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wkclt.inc b/project/src/ui/tab-wkclt.inc
new file mode 100644
index 0000000..04476f2
--- /dev/null
+++ b/project/src/ui/tab-wkclt.inc
@@ -0,0 +1,793 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wkclt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wkclt", 0,
+ "wkclt [option]... command [option|parameter|@file]...",
+ WKCLT_LONG " :"
+ " Analyze, modify, export and create KCL and OBJ files." },
+
+ //
+ //---------- list of all wkclt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wkclt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wkclt HELP [--width=wd] OPT|OPTION ...\n"
+ "wkclt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wkclt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wkclt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wkclt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wkclt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wkclt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wkclt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wkclt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wkclt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wkclt SYMBOLS",
+ "Print predefined symbols of text parser to standard output."
+ " The KCL specific symbols are included." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wkclt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the KCL specific functions."
+ " If one key ore more key entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wkclt CALCULATE expression...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "MATRIX", "MATRIX",
+ "wkclt MATRIX [patch-option]... [vector]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wkclt FLOAT number...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wkclt _EXPORT key...",
+ "This hidden command exports some definitions to standard output."
+ " Use keyword @HELP@ to get a list of possible keywords." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wkclt CAT source...",
+ "Read the entered KCL and OBJ files and print"
+ " them as OBJ files to standard output."
+ " The output of all source files is concatenated."
+ "\n "
+ " Automated dropping of bad KCL triangles is enabled"
+ " if no other drop option is specified by option {--kcl}." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wkclt DECODE source...",
+ "Read the entered KCL and OBJ files"
+ " and export them to OBJ files."
+ " The default destination is @'%P/%N.txt'@."
+ "\n "
+ " Automated dropping of bad KCL triangles is enabled"
+ " if no other drop option is specified by option {--kcl}." },
+
+ { T_DEF_CMD, "ENCODE", "ENCODE|ENC",
+ "wkclt ENCODE source...",
+ "Read the entered KCL and OBJ files"
+ " and encode (compile) them to binary KCL files."
+ " The default destination is @'%P/%N.kcl'@."
+ "\n "
+ " See https://szs.wiimm.de/doc/kcl for encoding details." },
+
+ { T_DEF_CMD, "COPY", "COPY|CP",
+ "wkclt COPY source dest\n"
+ "wkclt COPY source... [-d|-D] dest",
+ "Copy and convert a collision file from 'source' to 'dest'."
+ " Multiple KCL and OBJ sources can be used,"
+ " if 'dest' is a directory or contains at least one %-pattern."
+ "\n "
+ " This is an alternative for the DECODE and ENCODE commands."
+ " The default destination file format is selected by scanning the"
+ " file extension of the destination."
+ " Is it '.kcl', a binary KCL file is created."
+ " Is it '.txt' or '.obj', an OBJ file is created."
+ " Otherwise the output format is the same as the source."
+ "\n "
+ " Automated dropping of bad KCL triangles is enabled"
+ " if no other drop option is specified and the destination"
+ " is an OBJ file." },
+
+ { T_DEF_CMD, "CFF", "CFF",
+ "wkclt CFF source...",
+ "CFF is an abbreviation of 'create flag file' and"
+ " will create a flag file template for each entered source file."
+ " If the flag file already exists, only missing group names"
+ " are added at the end of file." },
+
+ { T_DEF_CMD, "FLAGS", "FLAGS|F",
+ "wkclt FLAGS source...",
+ "Print a KCL type and flag usage statistic for each source"
+ " to standard output." },
+
+ { T_DEF_CMD, "DUMP", "DUMP|D",
+ "wkclt DUMP source...",
+ "This debugging command prints an information dump about"
+ " the internal triangle data base and the octree"
+ " in human and machine readable text format."
+ " The output of all source files is concatenated"
+ " and printed to standard output." },
+
+ { T_DEF_CMD, "DBRIEF", "DBRIEF|DB",
+ "wkclt DBRIEF source...",
+ "Command @DBRIEF@ is a short cut for {DUMP --brief}."
+ " The output of the triangle list is suppressed"
+ " and only the header data and statistics are printed." },
+
+ { T_DEF_CMD, "LIST", "LIST",
+ "wkclt LIST source...",
+ "This debugging command prints a list of all triangles"
+ " with metrics in human and machine readable text format."
+ " It is like DUMP, but reduced to the list of triangles."
+ " The output of all source files is concatenated"
+ " and printed to standard output." },
+
+ { T_DEF_CMD, "TRIANGLES", "TRIANGLES",
+ "wkclt TRIANGLES source...",
+ "This debugging commands prints one data line for each triangle."
+ " The goal is to compare data. Therefor and to create smaller lines"
+ " the precision of the floating points numbers is reduced."
+ "\n "
+ " The print order is: flag used length | 3 points | 4 normals."
+ " For each point and normal 3 coordinates are printed." },
+
+ { T_DEF_CMD, "TRAVERSE", "TRAVERSE",
+ "wkclt TRAVERSE source point...",
+ "For each point, the octree of the source file is traversed"
+ " to find and print the related triangles."
+ " A point is either a comma separated list with 3 parser"
+ " expressions (one for each coordinate) or a vector expression." },
+
+ { T_DEF_CMD, "FALL", "FALL",
+ "wkclt FALL source point...",
+ "For each entered point, the lowest point is searched,"
+ " that can be reached without collision."
+ " The point is expanded to a cube with edge length of 100.0"
+ " for the collision tests." },
+
+ { T_DEF_CMD, "CHECK", "CHECK|CHK",
+ "wkclt CHECK source...",
+ "Read the entered KCL files (text or binary) and"
+ " and make a plausibility check."
+ " Hints and warnings are written to standard output."
+ " The exit status is @'DIFFER'@ if at least one KMP warning found." },
+
+ { H_DEF_CMD, "ANALYZE", "ANALYZE",
+ "wkclt ANALYZE source...",
+ "Analyze some KCL data." },
+
+ { T_DEF_CMD, "BLOW", "BLOW",
+ "wkclt BLOW source...",
+ "Try to calculate the used blow size (KCL_BLOW) of a KCL."
+ " Print one line for each source file." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ //
+ //---------- list of all wkclt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SCALE", "scale",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SHIFT", "shift",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "XSS", "xss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YSS", "yss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ZSS", "zss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ROT", "rot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "XROT", "xrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YROT", "yrot|hrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ZROT", "zrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "TRANSLATE", "translate",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NULL", "null",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NEXT", "next",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ASCALE", "ascale",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "AROT", "arot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "TFORM_SCRIPT", "tform-script|tformscript",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "KCL", "kcl",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "KCL_FLAG", "kcl-flag|kclflag",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "KCL_SCRIPT", "kcl-script|kclscript",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TRI_AREA", "tri-area|triarea",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TRI_HEIGHT", "tri-height|triheight|tri-ht|triht|kcl-min|kclmin",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "FLAG_FILE", "flag-file|flagfile",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GO, "XTRIDATA", "xtridata|xtri",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SLOT", "slot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ROUND", "round",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_CHECK", "N|no-check|nocheck",
+ 0,
+ "Do not make plausibility checks for KCL files." },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "TRACKS", "T|tracks",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "ARENAS", "A|arenas",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TINY", "tiny",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //
+ //---------- wkclt GROUP TRANSFORM ----------
+
+ { T_GRP_BEG, "TRANSFORM", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+ { T_COPT, "SCALE", 0,0,0 },
+ { T_COPT, "SHIFT", 0,0,0 },
+ { T_COPT, "XSS", 0,0,0 },
+ { T_COPT, "YSS", 0,0,0 },
+ { T_COPT, "ZSS", 0,0,0 },
+ { T_COPT, "ROT", 0,0,0 },
+ { T_COPT, "XROT", 0,0,0 },
+ { T_COPT, "YROT", 0,0,0 },
+ { T_COPT, "ZROT", 0,0,0 },
+ { T_COPT, "TRANSLATE", 0,0,0 },
+ { T_COPT, "NULL", 0,0,0 },
+ { T_COPT, "NEXT", 0,0,0 },
+ { T_COPT, "ASCALE", 0,0,0 },
+ { T_COPT, "AROT", 0,0,0 },
+ { T_COPT, "TFORM_SCRIPT", 0,0,0 },
+ { T_COPT, "KCL", 0,0,0 },
+ { T_COPT, "KCL_FLAG", 0,0,0 },
+ { T_COPT, "KCL_SCRIPT", 0,0,0 },
+ { T_COPT, "TRI_AREA", 0,0,0 },
+ { T_COPT, "TRI_HEIGHT", 0,0,0 },
+ { T_COPT, "FLAG_FILE", 0,0,0 },
+ { T_COPT, "SLOT", 0,0,0 },
+
+ //---------- wkclt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //
+ //---------- wkclt GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the syntax information section in KCL text files." },
+ { T_COPT, "BRIEF", 0,0,0 },
+
+ //
+ //---------- COMMAND wkclt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wkclt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wkclt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wkclt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_COPT, "VERBOSE", 0,0,
+ "Print the matrices of transformations." },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wkclt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wkclt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wkclt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wkclt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wkclt SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wkclt FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wkclt CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wkclt MATRIX ----------
+
+ { T_CMD_BEG, "MATRIX", 0,0,0 },
+
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "If set once, suppress vector dumps for transformation steps"
+ " and ignore option --long."
+ " If set twice, suppress vector dump for final transformation too." },
+ { T_COPT, "LONG", 0,0,
+ "If set once, print inverse matrix for the final transformation."
+ " If set twice, print inverse matrix for all transformations." },
+ { T_COPT, "QUIET", 0,0,
+ "Option --quiet is dedicated to automatic tests comparing"
+ " the old and new transformation algorithms."
+ " If set once, the tables are only printed, if the results differ."
+ " If set twice, nothing is printed at all"
+ " and only the exit status will inform about the results." },
+
+ //---------- COMMAND wkclt FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wkclt EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wkclt CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPY_CMD, "DECODE", 0,0,0 },
+
+ //---------- COMMAND wkclt COPY ----------
+
+ { T_CMD_BEG, "COPY", 0,0,0 },
+ { T_COPY_CMD, "ENCODE", 0,0,0 },
+
+ //---------- COMMAND wkclt CFF ----------
+
+ { T_CMD_BEG, "CFF", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Force usage of @'f(typ,variant)'@."
+ " If set twice, force usage of @'a(typ,w,x,y,z)'@." },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress the comments with the alternative expression formats." },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "CONST", 0,0,0 },
+ { T_COPT, "FLAG_FILE", 0,0,0 },
+
+ //---------- COMMAND wkclt FLAGS ----------
+
+ { T_CMD_BEG, "FLAGS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress the output of detailed flag list"
+ " and print only the type summary." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt DUMP ----------
+
+ { T_CMD_BEG, "DUMP", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress the output of the triangle list"
+ " and print only the header data and statistics." },
+ { T_COPT, "LONG", 0,0,
+ "If set, append an octree dump to the output."
+ " If set twice, add a triangle usage list behind the octree dump." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt DBRIEF ----------
+
+ { T_CMD_BEG, "DBRIEF", 0,0,0 },
+ { T_COPY_CMD, "DUMP", 0,0,0 },
+
+ //---------- COMMAND wkclt LIST ----------
+
+ { T_CMD_BEG, "LIST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt TRIANGLES ----------
+
+ { T_CMD_BEG, "TRIANGLES", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress the output of the 'normals' data." },
+ { T_COPT, "LONG", 0,0,
+ "For each occurrence of option --long increase the precision of"
+ " the floating points numbers by adding 1 fractional digit,"
+ " but only up to additionally 5 digits." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt TRAVERSE ----------
+
+ { T_CMD_BEG, "TRAVERSE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print the 0-based triangle index instead of the triangle coordinates." },
+ { T_COPT, "LONG", 0,0,
+ "If set, print a calculation log. If set twice,"
+ " print a calculation log for each octree traversing step." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt FALL ----------
+
+ { T_CMD_BEG, "FALL", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the height (y coordinate) of the result." },
+ { T_COPT, "LONG", 0,0,
+ "If set, print a calculation log."
+ " If set twice, be more verbose." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt CHECK ----------
+
+ { T_CMD_BEG, "CHECK", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print only warnings and suppress hints." },
+ { T_COPT, "LONG", 0,0,
+ "Be verbose and print more statistics." },
+ { T_COPT, "QUIET", 0,0,
+ "Be quiet until the first warning or hint is found." },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wkclt ANALYZE ----------
+
+ { T_CMD_BEG, "ANALYZE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkclt BLOW ----------
+
+ { T_CMD_BEG, "BLOW", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wkmpt.inc b/project/src/ui/tab-wkmpt.inc
new file mode 100644
index 0000000..97070b7
--- /dev/null
+++ b/project/src/ui/tab-wkmpt.inc
@@ -0,0 +1,932 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wkmpt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wkmpt", 0,
+ "wkmpt [option]... command [option|parameter|@file]...",
+ WKMPT_LONG " :"
+ " Analyze, modify, export and create (compile) KMP files." },
+
+ //
+ //---------- list of all wkmpt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wkmpt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wkmpt HELP [--width=wd] OPT|OPTION ...\n"
+ "wkmpt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wkmpt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wkmpt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wkmpt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wkmpt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wkmpt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wkmpt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wkmpt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wkmpt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wkmpt SYMBOLS",
+ "Print predefined symbols of text parser to standard output."
+ " The KMP specific symbols are included." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wkmpt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the KMP specific functions."
+ " If one key ore more key entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wkmpt CALCULATE expression...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "MATRIX", "MATRIX",
+ "wkmpt MATRIX [patch-option]... [vector]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wkmpt FLOAT number...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "STARTPOS", "STARTPOS|SP",
+ "wkmpt STARTPOS [patch-option]... key_or_file...",
+ "Print an ASCII image or a table of the start positions."
+ " The parameter list is a wild mix of filenames, keywords and numbers."
+ "\n "
+ " If a parameter contains a slash ('/' or '\\'),"
+ " it is a filename of a KMP or SZS file and a KMP is loaded."
+ " The KMP is used to print absolute positions and to find"
+ " the settings for @LEFT/RIGHT@ and @WIDE/NARROW@ automatically."
+ "\n"
+ " A parameter may also be one of the following keywords"
+ " to define a setting:"
+ " @RESET, IMAGE, TABLE, RELATIVE, ABSOLUTE, LEFT, RIGHT, WIDE, NARROW,"
+ " AUTO, NO-AUTO, DECIMAL, HEXADECIMAL, Z0, Z1, Z2, Z3@."
+ " A table or image is only printed on numbers 1 to 12."
+ "\1\n See https://szs.wiimm.de/cmd/wkmpt/startpos for details." },
+
+ { T_DEF_CMD, "OBJECTS", "OBJECTS|OBJ",
+ "wkmpt OBJECTS key...",
+ "Infos about all objects, that match any of the entered keys, are printed."
+ " A key match, if the text is part of the object name, file list"
+ " or info (ignoring case). If a key is a number (decimal or hex),"
+ " the object with that id matches too."
+ " This command uses an internal object and file database."
+ "\1 An online query is also available:"
+ " https://szs.wiimm.de/cgi/mkw/object" },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wkmpt _EXPORT key...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "XEXPORT", "_XEXPORT",
+ "wkmpt _XEXPORT",
+ "Export some tables for LE-CODE." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wkmpt CAT [source]...",
+ "Read the entered KMP files (text, binary or szs) and print"
+ " them as decoded text files to standard output."
+ " The output of all source files is concatenated." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wkmpt DECODE [source]...",
+ "Read the entered KMP files (text or binary)"
+ " and decode them to text files."
+ " The default destination is @'%P/%N.txt'@." },
+
+ { T_DEF_CMD, "ENCODE", "ENCODE|ENC",
+ "wkmpt ENCODE source...",
+ "Read the entered KMP files (text or binary)"
+ " and encode (compile) them to binary files."
+ " The default destination is @'%P/%N.kmp'@." },
+
+ { T_DEF_CMD, "DIFF", "DIFF|CMP",
+ "wkmpt DIFF source1 source2\n"
+ "wkmpt DIFF source... --dest dest",
+ "Compare the KMP of two or more sources (KMP, KMP-text or SZS)."
+ " Each KMP will be converted into the internal format,"
+ " and then fixed and patched controlled by options."
+ " Only the known sections are compared."
+ " If option SORT (see {--diff}) is set,"
+ " elements of section GOBJ are sorted by object-id."
+ "\n "
+ " This command is in development. So for the section @POTI@"
+ " only a simple notice about the different data record is printed."
+ "\n "
+ " If option {--dest} is set, then each source file"
+ " is compared with a file in the destination." },
+
+ { T_DEF_CMD, "DRAW", "DRAW|D|COBJECT|COB",
+ "wkmpt DRAW source...",
+ "Read the entered KMP files (text or binary),"
+ " of needed load the related KCL file,"
+ " draw KMP objects and create an OBJ file."
+ " The default destination is @'%P/%N.kmp.obj'@."
+ "\n "
+ " Automated dropping of bad KCL triangles is enabled"
+ " if no drop option is specified by option {--kcl}."
+ },
+
+ { T_DEF_CMD, "CHECK", "CHECK|CHK",
+ "wkmpt CHECK source...",
+ "Read the entered KMP files (text or binary) and"
+ " and make a plausibility check."
+ " Hints and warnings are written to standard output."
+ " The exit status is @'DIFFER'@ if at least one KMP warning found." },
+
+ { T_DEF_CMD, "STGI", "STGI",
+ "wkmpt STGI file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "KTPT", "KTPT",
+ "wkmpt KTPT [source]...",
+ "Analyse the start positions (KMP:KTPT) and lap counters"
+ " (KMP:CKPT with mode 0) and print a simple information list."
+ " Use enemy points (KMP:ENPT) to find recommendations."
+ "\n "
+ " This command is dedicated to LE-CODE, which supports an"
+ " alternative position for the finish line at the minimap." },
+
+ { T_DEF_CMD, "ROUTES", "ROUTES",
+ "wkmpt ROUTES file...",
+ "Print the internal cross references for routes of KMP sections"
+ " CKPH, CKPT, ENPH, ENPT, ITPH and ITPT." },
+
+ { H_DEF_CMD, "GOBJ", "GOBJ",
+ "wkmpt GOBJ [source]...",
+ "Analyze the objects of KMP section GOBJ"
+ " and print a status line for each object. ..." },
+
+ { T_DEF_CMD, "GAMEMODES", "GAMEMODES|GMODES",
+ "wkmpt GAMEMODES [source]...",
+ "Analyze the presence flags combinations"
+ " with and without extension support and print a list."
+ " The lists consists of index, scenario version and scenario name."
+ " Scenario versions are only equal, if the scenarios are duplicates."
+ " Duplicates happens only, if {--gamemodes} option TT or FULL is set." },
+
+ { T_DEF_CMD, "WIM0", "WIM0|W0",
+ "wkmpt WIM0 [source]...",
+ "Analyze the WIM0 section of each KMP file (text, binary or szs)"
+ " and print an info about it." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ //
+ //---------- list of all wkmpt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SCALE", "scale",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SHIFT", "shift",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "XSS", "xss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YSS", "yss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ZSS", "zss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ROT", "rot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "XROT", "xrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YROT", "yrot|hrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ZROT", "zrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YPOS", "ypos",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "TRANSLATE", "translate",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NULL", "null",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NEXT", "next",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ASCALE", "ascale",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "AROT", "arot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "TFORM_SCRIPT", "tform-script|tformscript",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "RM_GOBJ", "rm-gobj|rmgobj",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "BATTLE", "battle",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "EXPORT_FLAGS", "export-flags|exportflags|exflags",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "ROUTE_OPTIONS", "route-options|routeoptions|ropt",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "WIM0", "wim0",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SLOT", "slot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DRAW", "w|draw",
+ "list",
+ "The parameter is a comma separated list of keywords to select"
+ " the elements to draw."
+ " Allowed keywords are: @CKPT, CJGPT, JGPT, KTPT, ENPT, ITPT,"
+ " POTI, CNPT, ITEMBOXES, COINS, ROADOBJECTS, SOLIDOBJECTS, DECORATION,"
+ " BLACK, WHITE, KCL, NONE@ and @ALL@ (default);"
+ " the classes @POINTS, OBJECTS@ and @RESPAWN@;"
+ " the presence-flag selectors @[1-3]OFFLINE@ and @[1-3]ONLINE@;"
+ " the special options @DETAILED, DISPATCH@ and @WARNINGS@."
+ " If a keyword is prefixed by a minus sign, the option is disabled."
+ " Option @KCL@ decides, if the reference KCL is included in the output."
+ " If @DETAILED@ is disabled, an output with less faces is created."
+ " If @DISPATCH@ is enabled, the settings of dispatch points are visualized."
+ " If @WARNINGS@ is enabled, some objects are drawn in red."
+ "\1 See https://szs.wiimm.de/opt/draw for details." },
+
+ { T_OPT_CP, "POS_MODE", "pos-mode|posmode",
+ "list",
+ "Define a comma separated list of modes for the next {--pos-file} options."
+ " Each element of the list begins with a keyword followed by"
+ " a column index and/or a parameter list:"
+ " @X<col>, Y<col>, Z<col>, D<col>, C<num>, T<num>,"
+ " FA<col>=<str>, FB<col>=<str>, FC<col>=<str>, <COLOR>@"
+ "\1\n See https://szs.wiimm.de/opt/pos-mode for details." },
+
+ { T_OPT_CP, "POS_FILE", "pos-file|posfile",
+ "file",
+ "Load a position file created by mkw-ana and"
+ " print the positions into the map."
+ " Define the modes first,"
+ " because the last defined modes set by {--pos-mode} are used!" },
+
+ { T_OPT_CP, "PNG", "png",
+ "pix_size ['a' align] ['x' x1[:x2]] ['y' y1[:y2]] ['t' types]",
+ "Draw a PNG with a top view of the track instead of an OBJ file."
+ " Transformations are done after the KMP 3D drawing, but before PNG creation."
+ "\n "
+ " @'pix_size'@ is the number of world units (sqare) used for 1 PNG pixel."
+ " @'align'@ is a factor as anti-aliasing pixel multiplicator (>1 is on)."
+ " @'x'@ and @'y'@ defines the part of the world that is displayed."
+ " If not set, the check points (KMP/CKPT) are used to find a good area."
+ " @'t'@ is a bit field with 32 bits to enable the the KCL types."
+ " Each bit corresponds to one of the KCL types and only ."
+ " The default is to display all but not walls and solid fall ("
+ CONVERT_TO_STRING(OPT_PNG_TYPE_CLASS) ")."
+ "\n "
+ " All numeric values can be any expression allowed by the parser." },
+
+ { T_OPT_GP, "LOAD_KCL", "load-kcl|loadkcl",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "KCL", "kcl",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "KCL_FLAG", "kcl-flag|kclflag",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "KCL_SCRIPT", "kcl-script|kclscript",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TRI_AREA", "tri-area|triarea",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TRI_HEIGHT", "tri-height|triheight|tri-ht|triht|kcl-min|kclmin",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "FLAG_FILE", "flag-file|flagfile",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GO, "XTRIDATA", "xtridata|xtri",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "KMP", "kmp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "SPEED_MOD", "speed-mod|speedmod",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "KTPT2", "ktpt2",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TFORM_KMP", "tform-kmp|tformkmp|tkmp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "REPAIR_XPF", "repair-xpflags|repairxpflags|repxpf",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "GAMEMODES", "gamemodes|gmodes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ROUND", "round",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+// { T_OPT_CM, "FULL", "full",
+// 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0,
+ "Suppress information lines in decoded KMP text files."
+ " This includes syntax information ({--no-header})."
+ " If set twice, the output of unneeded sections is also suppressed." },
+
+ { T_OPT_C, "EXPORT", "X|export",
+ 0,
+ "Enable the export mode and create small and machine readable text files"
+ " for easy post processing."
+ " The option works similar like @-HBB@ for KMP text files." },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "EPSILON", "epsilon",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DIFF", "diff",
+ "list",
+ "List of KMP sections names that should be compared."
+ " To select a section, use a combiantion of the following keywords:"
+ " @AREA, CAME, CNPT, CKPH, CKPT, ENPH, ENPT, GOBJ, ITPH, ITPT,"
+ " JGPT, KTPT, MSPT, POTI, STGI, NONE, GOOD, DEFAULT@ of @ALL@ (default)."
+ " Additional keywords are @SORT@ (default) and @NOSORT@" },
+
+ { T_OPT_C, "GENERIC", "G|generic",
+ 0,
+ "Forget scanned entry names and use generic names for output." },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_CHECK", "N|no-check|nocheck",
+ 0,
+ "Do not make plausibility checks for KMP files." },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "TRACKS", "T|tracks",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "ARENAS", "A|arenas",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TINY", "tiny",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wkmpt GROUP TRANSFORM ----------
+
+ { T_GRP_BEG, "TRANSFORM", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+ { T_COPT, "SCALE", 0,0,0 },
+ { T_COPT, "SHIFT", 0,0,0 },
+ { T_COPT, "XSS", 0,0,0 },
+ { T_COPT, "YSS", 0,0,0 },
+ { T_COPT, "ZSS", 0,0,0 },
+ { T_COPT, "ROT", 0,0,0 },
+ { T_COPT, "XROT", 0,0,0 },
+ { T_COPT, "YROT", 0,0,0 },
+ { T_COPT, "ZROT", 0,0,0 },
+ { T_COPT, "YPOS", 0,0,0 },
+ { T_COPT, "TRANSLATE", 0,0,0 },
+ { T_COPT, "NULL", 0,0,0 },
+ { T_COPT, "NEXT", 0,0,0 },
+ { T_COPT, "ASCALE", 0,0,0 },
+ { T_COPT, "AROT", 0,0,0 },
+ { T_COPT, "TFORM_SCRIPT", 0,0,0 },
+ { T_COPT, "KMP", 0,0,0 },
+ { T_COPT, "SPEED_MOD", 0,0,0 },
+ { T_COPT, "KTPT2", 0,0,0 },
+ { T_COPT, "TFORM_KMP", 0,0,0 },
+ { T_COPT, "REPAIR_XPF", 0,0,0 },
+ { T_COPT, "RM_GOBJ", 0,0,0 },
+ { T_COPT, "BATTLE", 0,0,0 },
+ { T_COPT, "EXPORT_FLAGS", 0,0,0 },
+ { T_COPT, "ROUTE_OPTIONS",0,0,0 },
+ { T_COPT, "WIM0", 0,0,0 },
+ { T_COPT, "SLOT", 0,0,0 },
+ { T_COPT, "LOAD_KCL", 0,0,0 },
+
+ //---------- wkmpt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //---------- wkmpt GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the syntax information section in KMP text files." },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+ { T_COPT, "NO_PARAM", 0,0,0 },
+ { T_COPT, "GENERIC", 0,0,0 },
+ { T_COPT, "BATTLE", 0,0,0 },
+ { T_COPT, "EXPORT_FLAGS", 0,0,0 },
+ { T_COPT, "ROUTE_OPTIONS",0,0,0 },
+ { T_COPT, "WIM0", 0,0,0 },
+
+ //
+ //---------- COMMAND wkmpt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wkmpt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wkmpt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wkmpt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_COPT, "VERBOSE", 0,0,
+ "Print the matrices of transformations." },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wkmpt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wkmpt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wkmpt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wkmpt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wkmpt SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wkmpt FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wkmpt CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wkmpt MATRIX ----------
+
+ { T_CMD_BEG, "MATRIX", 0,0,0 },
+
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "If set once, suppress vector dumps for transformation steps"
+ " and ignore option --long."
+ " If set twice, suppress vector dump for final transformation too." },
+ { T_COPT, "LONG", 0,0,
+ "If set once, print inverse matrix for the final transformation."
+ " If set twice, print inverse matrix for all transformations." },
+ { T_COPT, "QUIET", 0,0,
+ "Option --quiet is dedicated to automatic tests comparing"
+ " the old and new transformation algorithms."
+ " If set once, the tables are only printed, if the results differ."
+ " If set twice, nothing is printed at all"
+ " and only the exit status will inform about the results." },
+
+ //---------- COMMAND wkmpt FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wkmpt STARTPOS ----------
+
+ { T_CMD_BEG, "STARTPOS", 0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkmpt OBJECTS ----------
+
+ { T_CMD_BEG, "OBJECTS", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Don't print the file list and the info line(s)."
+ " If set twice, only ID and object name is printed"
+ " and option {--long} is ignored." },
+ { T_COPT, "LONG", 0,0,
+ "Print each setting starting on a new line."
+ " --long and {--brief} can be used together." },
+
+ //---------- COMMAND wkmpt EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wkmpt EXPORT ----------
+
+ { T_CMD_BEG, "XEXPORT", 0,0,0 },
+
+ //---------- COMMAND wkmpt CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkmpt DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkmpt ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wkmpt DIFF ----------
+
+ { T_CMD_BEG, "DIFF", 0,0,0 },
+ { T_COPT, "QUIET", 0,0,
+ "If set once, only a summary status is printed."
+ " If set twice, the status is only reported as exit status." },
+ { T_COPT, "EPSILON", 0,0,0 },
+ { T_COPT, "DIFF", 0,0,0 },
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+
+ //---------- COMMAND wkmpt DRAW ----------
+
+ { T_CMD_BEG, "DRAW", 0,0,0 },
+ { T_COPT, "DRAW", 0,0,0 },
+ { T_COPT, "POS_MODE", 0,0,0 },
+ { T_COPT, "POS_FILE", 0,0,0 },
+ { T_COPT, "PNG", 0,0,0 },
+ { T_COPY_CMD, "DECODE", 0,0,0 },
+ { T_COPT, "KCL_SCRIPT", 0,0,0 },
+
+ //---------- COMMAND wkmpt CHECK ----------
+
+ { T_CMD_BEG, "CHECK", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print only warnings and suppress hints." },
+ { T_COPT, "LONG", 0,0,
+ "Be verbose and print more statistics." },
+ { T_COPT, "QUIET", 0,0,
+ "Be quiet until the first warning or hint is found." },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "GENERIC", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wkmpt STGI ----------
+
+ { T_CMD_BEG, "STGI", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,
+ "If set, ignore non existing source files"
+ " and files without KMP without warning."
+ " If set twice, ignore files with standard settings too." },
+
+ //---------- COMMAND wszst KTPT ----------
+
+ { T_CMD_BEG, "KTPT", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "KTPT2", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,
+ "If set, ignore non existing source files"
+ " and files without KMP without warning." },
+ { T_COPT, "LONG", 0,0,
+ "If set, compare each KTPT with each lap counter (some CKPT) and print"
+ " positions, directions, distances and recommendations as wide table." },
+
+ //---------- COMMAND wkmpt ROUTES ----------
+
+ { T_CMD_BEG, "ROUTES", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,
+ "If set, ignore non existing source files"
+ " and files without KMP without warning." },
+
+ //---------- COMMAND wkmpt GAMEMODES ----------
+
+ { T_CMD_BEG, "GOBJ", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress head and foot lines." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print only summary for each object category."
+ " If set twice, print a status vector only." },
+ { T_COPT, "LONG", 0,0,
+ "?" },
+
+ //---------- COMMAND wkmpt GAMEMODES ----------
+
+ { T_CMD_BEG, "GAMEMODES", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "GAMEMODES", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress head and foot lines." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the scenario version and configuration name."
+ " If set twice, suppress ead and foot lines too." },
+ { T_COPT, "LONG", 0,0,
+ "If set, print a status vector for each GOBJ element too:"
+ " '-': Object diabled;"
+ " '=': Object diabled by presence flags, but visible before race;"
+ " '+': Object enabled;"
+ " 'e': Depends on engine;"
+ " 'r': Depends on random scenario;"
+ " 'b': Defintion object of type BITS;"
+ " 'o': Defintion object of type OR;"
+ " 'a': Defintion object of type AND." },
+
+ //---------- COMMAND wkmpt WIM0 ----------
+
+ { T_CMD_BEG, "WIM0", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "If set, disable table format and append a full hexdump for each WIM0 section." },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wlect.inc b/project/src/ui/tab-wlect.inc
new file mode 100644
index 0000000..1eec891
--- /dev/null
+++ b/project/src/ui/tab-wlect.inc
@@ -0,0 +1,837 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wlect /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wlect", 0,
+ "wlect [option]... command [option|parameter|@file]...",
+ WLECT_LONG " :"
+ " Manage the $LE-CODE$ and LEX extensions." },
+
+ //
+ //---------- list of all wlect commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wlect VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wlect HELP [--width=wd] OPT|OPTION ...\n"
+ "wlect HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wlect HELP [--width=wd] command [-b] [ignored]...\n"
+ "wlect HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wlect ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wlect TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wlect COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wlect ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wlect FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wlect FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wlect SYMBOLS",
+ "Print predefined symbols of text parser to standard output."
+ " The LE-CODE specific symbols are included." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wlect FUNCTIONS [key]...",
+ "Print a list with all parser functions including"
+ " the LE-CODE specific functions."
+ " If one key ore more key entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wlect CALCULATE expression...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wlect FLOAT number...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output."
+ " Use keyword @HELP@ to get a list of possible keywords." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "DUMP", "DUMP|D",
+ "wlect DUMP [source]...",
+ "Print an information dump for each source file."
+ " LE-CODE binaries and LEX binaries are accepted as input." },
+
+ { T_DEF_CMD, "DL", "DL",
+ "wlect DL [source]...",
+ "Short cut for {DUMP --long}." },
+
+ { T_DEF_CMD, "DLL", "DLL",
+ "wlect DLL [source]...",
+ "Short cut for {DUMP --long --long}." },
+
+ { T_DEF_CMD, "BIN_DIFF", "BIN-DIFF|BINDIFF|BD",
+ "wlect BIN-DIFF settings binary1 binary2",
+ "Compare parts of 2 different LECODE binary files."
+ " @SETTINGS@ is a string with plus and minus signs to switch between"
+ " plus/minus modes, and some key letters to select parts:"
+ " s:size, h:header, t:timestamp, b:body, p:parameters,"
+ " d:data, c:code and a:all."
+ " In plus-mode, a test is enabled, in minus-mode it is disabled."
+ " Scanning starts in plus-mode."
+ "\n "
+ " Example: @a-t@: compare all except timestamps."
+ "\n "
+ " The exist status is @OK@ (0) if nothing differ,"
+ " @DIFFER@ (2) if at least one test failed, or an error code." },
+
+ { T_DEF_CMD, "PATCH", "PATCH|P",
+ "wlect PATCH [le_bin]...",
+ "Read each LE-BIN file and patch it."
+ " Use {--le-define} to setup cups and tracks." },
+
+ { T_DEF_CMD, "LPAR", "LPAR",
+ "wlect LPAR [le_bin]...",
+ "Read each LE-BIN file and patch it."
+ " Then extract the LE-CODE parameters and store them as LPAR"
+ " text file. Print the result to standard output if no other"
+ " destination is defined." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "CREATE", "CREATE|CR",
+ "wlect CREATE [keyword]",
+ "Create a file and print it to standard output."
+ " The kind of file is defined by KEYWORD."
+ " Use command without keywords to get a list of possible keywords."
+ "\n "
+ " The following keywords are possible:"
+ " @LEX@ for a LEX text file with all known sections except @TEST@."
+ " @LEX+@ for a LEX text file with all known sections including @TEST@."
+ " @SET1, CANN, HIPT@ and @TEST@ (section names)"
+ " for a LEX text file with 1 section only."
+ " @LPAR@ for an example LE-CODE parameter file." },
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wlect CAT [source]...",
+ "Read the entered LEX and LE-CODE files (text, binary or szs)"
+ " and print them as decoded text files to standard output."
+ " The output of all source files is concatenated." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wlect DECODE [source]...",
+ "Read the entered LEX files (text or binary)"
+ " and decode them to text files."
+ " The default destination is @'%P/%N.txt'@." },
+
+ { T_DEF_CMD, "ENCODE", "ENCODE|ENC",
+ "wlect ENCODE source...",
+ "Read the entered LEX files (text or binary)"
+ " and encode (compile) them to binary files."
+ " The default destination is @'%P/%N.lex'@." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ //
+ //---------- list of all wlect options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ "[=param]",
+ "This option is completely ignored by wlect."
+ " It only exists due to compatibility with the other tools." },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ROUND", "round",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0,
+ "Suppress cross reference comments." },
+
+ #if 0 // BMG disabled for wlect
+
+ { T_OPT_C, "RAW", "raw",
+ 0,
+ "Print BMG messages as UTF-8 text without escape sequences." },
+
+ { T_OPT_CP, "BMG_ENCODING", "bmg-encoding|bmgencoding",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "BMG_INF_SIZE", "bmg-inf-size|bmginfsize",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CO, "BMG_MID", "bmg-mid|bmgmid",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "FORCE_ATTRIB", "force-attrib|forceattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEF_ATTRIB", "def-attrib|defattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ATTRIB", "no-attrib|noattrib",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "X_ESCAPES", "x-escapes|xescapes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OLD_ESCAPES", "old-escapes|oldescapes",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "SINGLE_LINE", "1|single-line|singleline",
+ 0,
+ "If set, don't print continuation lines for BMG text output."
+ " If set twice, print only single text lines but not value lines." },
+
+ { T_OPT_C, "NO_BMG_COLORS","no-bmg-colors|nobmgcolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BMG_COLORS", "bmg-colors|bmgcolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_BMG_INLINE","no-bmg-inline|nobmginline",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { T_OPT_C, "EXPORT", "X|export",
+ 0,
+ "Enable the export mode and create small and machine readable text files"
+ " for easy post processing." },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "LT_CLEAR", "lt-clear|ltclear",
+ 0,
+ "Clear LEX section TEST and remove the section if empty."
+ " This option is executed before all other --lt-* options." },
+
+ { T_OPT_CP, "LT_ONLINE", "lt-online|ltonline",
+ "value",
+ "Set LEX/TEST parameter OFFLINE-ONLINE to this MODE."
+ " MODE is one of @AUTO@ (default), @NEVER@ or @ALWAYS@."
+ " If needed, LEX section TEST is created or removed if empty." },
+
+ { T_OPT_CP, "LT_N_PLAYERS", "lt-n-players|lt-nplayers|ltnplayers",
+ "offline,online",
+ "Set LEX/TEST parameters N-OFFLINE and N-ONLINE to these integer values."
+ " If needed, LEX section TEST is created or removed if empty." },
+
+ { T_OPT_GP, "LT_COND_BIT", "lt-cond-bit|lt-condbit|ltcondbit",
+ "bitnum",
+ "Set LEX/TEST parameter COND-BIT to this integer value."
+ " Use -1 to deactivate this COND-BIT."
+ " If needed, LEX section TEST are created or removed if empty." },
+
+ { T_OPT_GP, "LT_GAME_MODE", "lt-game-mode|lt-gamemode|ltgamemode",
+ "mode",
+ "Set LEX/TEST parameter GAME-MODE to this MODE."
+ " MODE is one of @AUTO@ (default), @Balloon, COIN, VERSUS@ or @ITEMRAIN@."
+ " If needed, LEX section TEST is created or removed if empty." },
+
+ { T_OPT_GP, "LT_ENGINE", "lt-engine|ltengine",
+ "mode",
+ "Set LEX/TEST parameter ENGINE to this MODE."
+ " MODE is one of @AUTO@ (default), @BATTLE, 50CC, 100CC, 150CC, 200CC,"
+ " 150M@ or @200M@. Only track.szs files are modified."
+ " If needed, LEX section TEST is created or removed if empty." },
+
+ { T_OPT_GP, "LT_RANDOM", "lt-random|ltrandom",
+ "index",
+ "Force a random scenario, if between 1 and 8."
+ " Value 0 enables auto selection and -1 disables this option."
+ " If needed, LEX section TEST is created or removed if empty." },
+
+ { T_OPT_G, "LEX_PURGE", "lex-purge|lexpurge",
+ 0,
+ "Delete LEX sections without any impact."
+ " This option is executed after all --lt-* options." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "LE_DEFINE", "le-define|ledefine",
+ "file",
+ "Use this file as definition file to patch LE-CODE."
+ " The file format can be LE-BIN or any supported CT-CODE file"
+ " (BRRES, TEX0, CT-CODE or CT-TEXT)." },
+
+ { T_OPT_CP, "LPAR", "lpar",
+ "file",
+ "Read a LPAR file to overwrite settings of LE-CODE section LPAR." },
+
+ { T_OPT_CP, "ALIAS", "alias",
+ "list",
+ "The parameter is a comma separated list of @SLOT=ALIAS@ elements."
+ " SLOT defines the slot, for which the ALIAS is defined."
+ " ALIAS itself is a slot number to be executed, if SLOT is selected."
+ " Empty and invalid elements are ignored."
+ " Multiple usage is possible: the lists are concatenated." },
+
+ { T_OPT_CP, "ENGINE", "engine",
+ "list",
+ "Define probabilities for engine classes."
+ " @LIST@ is a vector for @100cc,150cc,mirror@"
+ " If 200cc is enabled by {--200cc},"
+ " then vector is interpreted as @150cc,200cc,mirror@."
+ " Any numbers are accepted."
+ " They are normalized to get a total of 100 percent."
+ " Use @0,1,0@ to force 150cc only."
+ " Use @0,0,0@ to reset to Nintendos VR based choice." },
+
+ { T_OPT_CO, "200CC", "200cc",
+ "[=mode]",
+ "Enable or disable 200cc support."
+ " Mode is one of @OFF@, @AUTO@ (default) or @ON@"
+ " (default, if option is used without parameter)."
+ " LE-CODE hasn't implemented this feature yet!" },
+
+ { T_OPT_CO, "PERFMON", "perf-mon|perfmon",
+ "[=mode]",
+ "Enable or disable the performance monitor."
+ " Mode is one of @OFF@, @AUTO@ (default, don't change setting),"
+ " @ON@ (enable it for Wii only; default, if option is used without parameter)"
+ " or @FORCE@ (enable it for Wii and for Dolphin)." },
+
+ { T_OPT_CO, "CUSTOM_TT", "custom-tt|customtt",
+ "[=mode]",
+ "Enable or disable time trial for custom tracks."
+ " Mode is one of @OFF@, @AUTO@ (default) or @ON@"
+ " (default, if option is used without parameter)." },
+
+ { T_OPT_CO, "XPFLAGS", "xpflags",
+ "[=mode]",
+ "Enable or disable support for Extended Presence Flags."
+ " Mode is one of @OFF@, @AUTO@ (default) or @ON@"
+ " (default, if option is used without parameter)."
+ " Disable it only for tests!" },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "TRACK_DIR", "track-dir|trackdir",
+ "directory",
+ "Define a destination directory,"
+ " where track files are copied, moved or linked to."
+ " Usually it is @.../Race/Course/@."
+ "\n "
+ " Files are searched in directories defined by {--copy-tracks},"
+ " {--move-tracks}, {--move1-tracks} and {--link-tracks}"
+ " in definition order."
+ " Already existing files are removed before operation." },
+
+ { T_OPT_CMP, "COPY_TRACKS", "copy-tracks|copytracks",
+ "directory",
+ "Define a search directory for all included tracks."
+ " Files found in this directory are copied to the"
+ " directory specified by option {--track-dir}." },
+
+ { T_OPT_CMP, "MOVE_TRACKS", "move-tracks|movetracks",
+ "directory",
+ "Define a search directory for all included tracks."
+ " Files found in this directory are moved to the"
+ " directory specified by option {--track-dir}."
+ " If moving fails, the file is copied and the source removed." },
+
+ { T_OPT_CMP, "MOVE1_TRACKS", "move1-tracks|move1tracks",
+ "directory",
+ "Define a search directory for all included tracks."
+ " Files found in this directory are moved to the"
+ " directory specified by option {--track-dir},"
+ " but only if a file has not more than one hard link."
+ " This guarantees an unique version of the file."
+ " If the file has more hard links or moving fails,"
+ " the file is copied and the source removed." },
+
+ { T_OPT_CMP, "LINK_TRACKS", "link-tracks|linktracks",
+ "directory",
+ "Define a search directory for all included tracks."
+ " Files found in this directory are linked to the"
+ " directory specified by option {--track-dir}."
+ " If linking fails, the file is copied." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "COMPLETE", "C|complete",
+ 0,
+ " Append missing sections to the LEX file." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CMP, "LOAD_BMG", "load-bmg|loadbmg",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CMP, "PATCH_BMG", "patch-bmg|patchbmg|pb",
+ "mode[cond][=param]",
+ PATCH_BMG_TEXT("") },
+
+ { T_OPT_CMP, "MACRO_BMG", "macro-bmg|macrobmg|mb",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PATCH_NAMES", "patch-names|patchnames",
+ 0,
+ "If set, the names of the CUP1 and CSR1 sections are patched "
+ " by the loaded BMG files directly after loading the source files." },
+
+ { T_OPT_CP, "ORDER_BY", "order-by|orderby|order",
+ "bmg",
+ "Load the BMG file and filter track names."
+ " Then before creating output files,"
+ " re-distribute the tracks of the additonal cups (9-)"
+ " to the same cups by the order of the read track names."
+ " Tracks without BMG reference are placed at the end of all tracks."
+ " This option modifes only the track order of the cups,"
+ " but will not change any name." },
+
+ { T_OPT_C, "ORDER_ALL", "order-all|orderall",
+ 0,
+ "Used together with option {--order-by}:"
+ " Re-distribute the tracks of all cups beginning with Mushroom Cup." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wlect GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //---------- wlect GROUP PATCH ----------
+
+ { T_GRP_BEG, "PATCH", 0,0,0 },
+
+ { T_COPT, "LE_DEFINE", 0,0,0 },
+ { T_COPT, "LPAR", 0,0,0 },
+ { T_COPT, "ALIAS", 0,0,0 },
+ { T_COPT, "ENGINE", 0,0,0 },
+ { T_COPT, "200CC", 0,0,0 },
+ { T_COPT, "PERFMON", 0,0,0 },
+ { T_COPT, "CUSTOM_TT", 0,0,0 },
+ { T_COPT, "XPFLAGS", 0,0,0 },
+
+ //---------- wlect GROUP PATCH_LEX ----------
+
+// { T_GRP_BEG, "PATCH_LEX", 0,0,0 },
+// { T_COPT, "LT_CLEAR", 0,0,0 },
+// { T_COPT, "LT_ONLINE", 0,0,0 },
+// { T_COPT, "LT_N_PLAYERS", 0,0,0 },
+// { T_COPT, "LT_COND_BIT", 0,0,0 },
+// { T_COPT, "LT_GAME_MODE", 0,0,0 },
+// { T_COPT, "LT_ENGINE", 0,0,0 },
+// { T_COPT, "LT_RANDOM", 0,0,0 },
+// { T_COPT, "LEX_PURGE", 0,0,0 },
+
+ //---------- wlect GROUP TRACK_COPY ----------
+
+ { T_GRP_BEG, "TRACK_COPY", 0,0,0 },
+
+ { T_COPT, "TRACK_DIR", 0,0,0 },
+ { T_COPT, "COPY_TRACKS", 0,0,0 },
+ { T_COPT, "MOVE_TRACKS", 0,0,0 },
+ { T_COPT, "MOVE1_TRACKS", 0,0,0 },
+ { T_COPT, "LINK_TRACKS", 0,0,0 },
+
+ //---------- wlect GROUP TEXTOPT ----------
+
+ { T_GRP_BEG, "TEXTOPT", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the syntax information section in LE text files." },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+
+ //---------- wlect GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "TEXTOPT", 0,0,0 },
+
+ //
+ //---------- COMMAND wlect VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wlect HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wlect ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wlect TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wlect COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wlect ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wlect FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wlect FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wlect SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wlect FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wlect CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wlect FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wlect _EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wlect DUMP ----------
+
+ { T_CMD_BEG, "DUMP", 0,0,0 },
+
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "For LE-CODE binaries:"
+ " If set, print cups with tracks or arenas."
+ " For each track, property and music slot is printed in brackets."
+ " If set twice, print a track list too."
+ "\n "
+ " For LEX binaries:"
+ " If set, print a hex dump of max 16 bytes (1 line) of the element data."
+ " If set twice, print a hex dump of max 64 bytes (4 lines)."
+ " If set 3 times ore more, print a complete hex dump." },
+ { T_COPT, "VERBOSE", 0,0,
+ "For LE-CODE binaries: If set, print a track slot usage table." },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wlect DL ----------
+
+ { T_CMD_BEG, "DL", 0,0,0 },
+ { T_COPY_CMD, "DUMP", 0,0,0 },
+
+ //---------- COMMAND wlect DLL ----------
+
+ { T_CMD_BEG, "DLL", 0,0,0 },
+ { T_COPY_CMD, "DUMP", 0,0,0 },
+
+ //---------- COMMAND wlect BIN-DIFF ----------
+
+ { T_CMD_BEG, "BIN_DIFF", 0,0,0 },
+
+ { T_COPT, "QUIET", 0,0,
+ "Suppress all messages and tell result as exit status only." },
+ { T_COPT, "VERBOSE", 0,0,
+ "Be more verbose and tell, what tests are planned." },
+
+ //---------- COMMAND wlect PATCH ----------
+
+ { T_CMD_BEG, "PATCH", 0,0,0 },
+
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { T_COPY_GRP, "TRACK_COPY", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+// { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wlect LPAR ----------
+
+ { T_CMD_BEG, "LPAR", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+
+ //---------- COMMAND wlect CREATE ----------
+
+ { T_CMD_BEG, "CREATE", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "LPAR", 0,0,0 },
+ { T_COPT, "LT_CLEAR", 0,0,0 },
+ { T_COPT, "LT_ONLINE", 0,0,0 },
+ { T_COPT, "LT_N_PLAYERS", 0,0,0 },
+ { T_COPT, "LT_COND_BIT", 0,0,0 },
+ { T_COPT, "LT_GAME_MODE", 0,0,0 },
+ { T_COPT, "LT_ENGINE", 0,0,0 },
+ { T_COPT, "LT_RANDOM", 0,0,0 },
+ { T_COPT, "LEX_PURGE", 0,0,0 },
+
+ //---------- COMMAND wlect CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPT, "COMPLETE", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wlect DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPT, "COMPLETE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wlect ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPT, "COMPLETE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wmdlt.inc b/project/src/ui/tab-wmdlt.inc
new file mode 100644
index 0000000..c4a8e1c
--- /dev/null
+++ b/project/src/ui/tab-wmdlt.inc
@@ -0,0 +1,600 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wmdlt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wmdlt", 0,
+ "wmdlt [option]... command [option|parameter|@file]...",
+ WMDLT_LONG " :"
+ " Decode raw MDL and encode text MDL files." },
+
+ //
+ //---------- list of all wmdlt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wmdlt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wmdlt HELP [--width=wd] OPT|OPTION ...\n"
+ "wmdlt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wmdlt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wmdlt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wmdlt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wmdlt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wmdlt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wmdlt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wmdlt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wmdlt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wmdlt SYMBOLS",
+ "Print predefined symbols of text parser to standard output."
+ " The MDL specific symbols are included." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wmdlt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the MDL specific functions."
+ " If one key ore more key entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wmdlt CALCULATE expression...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "MATRIX", "MATRIX",
+ "wmdlt MATRIX [patch-option]... [vector]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wmdlt FLOAT number...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output."
+ " Use keyword @HELP@ to get a list of possible keywords." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wmdlt CAT [source]...",
+ "Read the entered MDL files (text or binary) and print"
+ " them as decoded text files to standard output (stdout)."
+ " The output of all source files is concatenated."
+ "\n "
+ " A decoded MDL0 file can only be used for analysis."
+ " Encoding or creating a new MDL0 file is not supported." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wmdlt DECODE [source]...",
+ "Read the entered MDL files (text or binary)"
+ " and decode them to text files."
+ " The default destination is @'%P/%N.txt'@."
+ "\n "
+ " A decoded MDL0 file can only be used for analysis."
+ " Encoding or creating a new MDL0 file is not supported." },
+
+ { H_DEF_CMD, "ENCODE", "ENCODE|ENC",
+ "wmdlt ENCODE [source]...",
+ "Read the entered MDL files (text or binary)"
+ " and encode (compile) them to binary files."
+ " The default destination is @'%P/%N.mdl'@." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "STRINGS", "STRINGS",
+ "wmdlt STRINGS [source]...",
+ "Read the entered MDL files (text or binary)"
+ " and print all strings of all sections."
+ "\n "
+ " For archives like SZS or BREES,"
+ " the strings of each containing MDL are printed."
+ " It is also possible to address an internal sub-file like"
+ " @track.szs/course_model.brres@." },
+
+ { H_DEF_CMD, "GEOMETRY", "GEOMETRY|GEO",
+ "wmdlt GEOMETRY [source]...",
+ "Read the entered MDL files (text or binary) and print"
+ " some geometry information to the standard output (stdout)."
+ " The output of all source files is concatenated." },
+
+ { H_DEF_CMD, "XTEST", "_TEST",
+ "wszst _TEST [files]",
+ "Test something." },
+
+ //
+ //---------- list of all wmdlt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "MDL", "mdl",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SCALE", "scale",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "SHIFT", "shift",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "XSS", "xss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YSS", "yss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ZSS", "zss",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ROT", "rot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "XROT", "xrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "YROT", "yrot|hrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ZROT", "zrot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "TRANSLATE", "translate",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NULL", "null",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NEXT", "next",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ASCALE", "ascale",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "AROT", "arot",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "TFORM_SCRIPT", "tform-script|tformscript",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ROUND", "round",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_CHECK", "N|no-check|nocheck",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "TRACKS", "T|tracks",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "ARENAS", "A|arenas",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TINY", "tiny",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wmdlt GROUP TRANSFORM ----------
+
+ { T_GRP_BEG, "TRANSFORM", 0,0,0 },
+
+ //{ T_COPT, "CONST", 0,0,0 },
+ { T_COPT, "SCALE", 0,0,0 },
+ { T_COPT, "SHIFT", 0,0,0 },
+ { T_COPT, "XSS", 0,0,0 },
+ { T_COPT, "YSS", 0,0,0 },
+ { T_COPT, "ZSS", 0,0,0 },
+ { T_COPT, "ROT", 0,0,0 },
+ { T_COPT, "XROT", 0,0,0 },
+ { T_COPT, "YROT", 0,0,0 },
+ { T_COPT, "ZROT", 0,0,0 },
+ { T_COPT, "TRANSLATE", 0,0,0 },
+ { T_COPT, "NULL", 0,0,0 },
+ { T_COPT, "ASCALE", 0,0,0 },
+ { T_COPT, "AROT", 0,0,0 },
+ { T_COPT, "TFORM_SCRIPT", 0,0,0 },
+ { T_COPT, "NEXT", 0,0,0 },
+ { T_COPT, "MDL", 0,0,0 },
+
+
+ //---------- wmdlt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //
+ //---------- wmdlt GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the syntax information section in MDL text files." },
+ { T_COPT, "BRIEF", 0,0,0 },
+
+ //
+ //---------- COMMAND wmdlt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wmdlt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wmdlt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wmdlt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_COPT, "VERBOSE", 0,0,
+ "Print the matrices of transformations." },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wmdlt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wmdlt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wmdlt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wmdlt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wmdlt SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wmdlt FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wmdlt CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wmdlt MATRIX ----------
+
+ { T_CMD_BEG, "MATRIX", 0,0,0 },
+
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "If set once, suppress vector dumps for transformation steps"
+ " and ignore option --long."
+ " If set twice, suppress vector dump for final transformation too." },
+ { T_COPT, "LONG", 0,0,
+ "If set once, print inverse matrix for the final transformation."
+ " If set twice, print inverse matrix for all transformations." },
+ { T_COPT, "QUIET", 0,0,
+ "Option --quiet is dedicated to automatic tests comparing"
+ " the old and new transformation algorithms."
+ " If set once, the tables are only printed, if the results differ."
+ " If set twice, nothing is printed at all"
+ " and only the exit status will inform about the results." },
+
+ //---------- COMMAND wmdlt FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wmdlt EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wmdlt CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wmdlt DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wmdlt ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wmdlt STRINGS ----------
+
+ { T_CMD_BEG, "STRINGS", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wmdlt GEOMETRY ----------
+
+ { T_CMD_BEG, "GEOMETRY", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wmdlt _TEST ----------
+
+ { T_CMD_BEG, "XTEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wpatt.inc b/project/src/ui/tab-wpatt.inc
new file mode 100644
index 0000000..a55b2bf
--- /dev/null
+++ b/project/src/ui/tab-wpatt.inc
@@ -0,0 +1,441 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wpatt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wpatt", 0,
+ "wpatt [option]... command [option|parameter|@file]...",
+ WPATT_LONG " :"
+ " Decode raw PAT and encode text PAT files." },
+
+ //
+ //---------- list of all wpatt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wpatt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wpatt HELP [--width=wd] OPT|OPTION ...\n"
+ "wpatt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wpatt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wpatt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wpatt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wpatt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wpatt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wpatt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wpatt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wpatt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wpatt SYMBOLS",
+ "Print predefined symbols of text parser to standard output."
+ " The PAT specific symbols are included." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wpatt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the PAT specific functions."
+ " If one key ore more key entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wpatt CALCULATE expression...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wpatt FLOAT number...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output."
+ " Use keyword @HELP@ to get a list of possible keywords." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wpatt CAT [source]...",
+ "Read the entered PAT files (text or binary) and print"
+ " them as decoded text files to standard output (stdout)."
+ " The output of all source files is concatenated." },
+
+ { T_DEF_CMD, "DECODE", "DECODE|DEC",
+ "wpatt DECODE [source]...",
+ "Read the entered PAT files (text or binary)"
+ " and decode them to text files."
+ " The default destination is @'%P/%N.txt'@." },
+
+ { T_DEF_CMD, "ENCODE", "ENCODE|ENC",
+ "wpatt ENCODE [source]...",
+ "Read the entered PAT files (text or binary)"
+ " and encode (compile) them to binary files."
+ " The default destination is @'%P/%N.pat'@." },
+
+ //
+ //---------- list of all wpatt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "ROUND", "round",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NO_CHECK", "N|no-check|nocheck",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "TRACKS", "T|tracks",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GP, "ARENAS", "A|arenas",
+ 0,
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "PAT", "pat",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ //
+ //---------- wpatt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_COPT, "PAT", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //
+ //---------- wpatt GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress the syntax information section in PAT text files." },
+ { T_COPT, "BRIEF", 0,0,0 },
+
+ //
+ //---------- COMMAND wpatt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wpatt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wpatt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wpatt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wpatt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wpatt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wpatt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wpatt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wpatt SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wpatt FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wpatt CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wpatt FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wpatt EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wpatt CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wpatt DECODE ----------
+
+ { T_CMD_BEG, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wpatt ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wstrt.inc b/project/src/ui/tab-wstrt.inc
new file mode 100644
index 0000000..841a4e7
--- /dev/null
+++ b/project/src/ui/tab-wstrt.inc
@@ -0,0 +1,1038 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wstrt /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wstrt", 0,
+ "wstrt [option]... command [option|parameter|@file]...",
+ WSTRT_LONG " :"
+ " Manipulate the 'main.dol' and 'StaticR.rel' files"
+ " of Mario Kart Wii." },
+
+ //
+ //---------- list of all wstrt commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wstrt VERSION [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wstrt HELP [--width=wd] OPT|OPTION ...\n"
+ "wstrt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wstrt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wstrt HELP [--width=wd] [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wstrt ARGTEST ...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wstrt TEST [options]... [ignored]...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wstrt COLORS",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wstrt ERROR [error_code]",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wstrt FILETYPE file...",
+ 0 /* copy of wszst */ },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wstrt FILEATTRIB [keyword]...",
+ 0 /* copy of wszst */ },
+
+ { H_DEF_CMD, "RAWDUMP", "_RAWDUMP",
+ "wszst _RAWDUMP [-d|-D] destdir",
+ "This hidden command creates the destination directory "
+ " and create several files as copy of internal data." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "DUMP", "DUMP",
+ "wstrt DUMP file...",
+ "Dump the structure of 'StaticR.rel' (in development)"
+ " and of DOL files as text." },
+
+ { H_DEF_CMD, "CDUMP", "_CDUMP",
+ "wstrt _CDUMP file...",
+ "Dump the structure of 'StaticR.rel' (in development)"
+ " and of DOL files as C source fragments." },
+
+ { T_DEF_CMD, "HEXDUMP", "HEXDUMP|XDUMP",
+ "wstrt HEXDUMP file...",
+ "Dump the content of DOL files as hex dump and use virtual addresses."
+ " Select parts by --vaddr, --faddr and --sname."
+ " Without selectors, the whole file is dumped." },
+
+ { H_DEF_CMD, "HTTPS", "_HTTPS",
+ "wstrt _HTTPS file...",
+ "Collect data about https-requests and print a total summary"
+ " for all accepted files." },
+
+ { T_DEF_CMD, "EXTRACT", "EXTRACT|X",
+ "wstrt EXTRACT dol...",
+ "Extract the sections of a DOL file into a directory."
+ " StaticR.rel files are ignored." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "TRACKS", "TRACKS",
+ "wstrt TRACKS [file]...",
+ "Show track infos in the order of the 'StaticR.rel' files."
+ " If no file is entered, the standard order is used." },
+
+ { T_DEF_CMD, "ARENAS", "ARENAS",
+ "wstrt ARENAS [file]...",
+ "Show arena infos in the order of the 'StaticR.rel' files."
+ " If no file is entered, the standard order is used." },
+
+ { T_DEF_CMD, "FILES", "FILES",
+ "wstrt FILES [file]...",
+ "List track and arena file names in machine readable format."
+ " Use the order of the entered 'StaticR.rel' files."
+ " If no file is entered, the standard order is used." },
+
+ { T_DEF_CMD, "FIND", "FIND",
+ "wstrt FIND [+]TRACK keyword...\n"
+ "wstrt FIND [+]ARENA keyword...",
+ "Find a track or arena by keyword and print one line for each keyword"
+ " in machine readable format @'type slot'@"
+ " or, if not found, a simple @'-'@."
+ " The name is searched in the entered context (tracks or arenas)."
+ " If @TRACK@ or @ARENA@ is prefixed by a plus, then a failed search"
+ " will be continued in the other context."
+ " If at least one name is not found,"
+ " the tool terminates with exit code @NOT_EXISTS@." },
+
+ { T_DEF_CMD, "POINTS", "POINTS|PTS",
+ "wstrt POINTS [--points=list] [file]...",
+ "Print a table with the points assigned to player after"
+ " a versus or room race for each entered file."
+ " If no file is entered, the standard table is used."
+ " However, if option {--points} is set only the resulting table"
+ " is printed." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "ANALYZE", "ANALYZE|ANA|ANALYSE",
+ "wstrt ANALYZE [file]...",
+ "Open 'StaticR.rel' and DOL files and analyze them."
+ " The files will be classified using SHA1 checksums." },
+
+ { T_DEF_CMD, "PATCH", "PATCH",
+ "wstrt PATCH [file]...",
+ "Patch 'main.dol and 'StaticR.rel' files of Mario Kart Wii."
+ " No backup is made." },
+
+ //
+ //---------- list of all wstrt options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "AT_DUMMY", "@|@", 0, "" },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "DE", "de",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0,
+ "List only the track file names and suppress table header and footer." },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "TRACKS", "T|tracks",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "ARENAS", "A|arenas",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GP, "REGION", "R|region",
+ "region",
+ "If 'region' is an unsigned number, the region"
+ " for online versus races and for battles is patched"
+ " to the entered number."
+ " If the number is prefixed by the letter @'t'@, a test mode"
+ " is enabled and the places are patched with ascending numbers."
+ " You can patch StaticR.rel and main.dol."
+ "\n "
+ " Otherwise a keyword is expected."
+ " Official regions are: @JAPAN(0), AMERICA(1), EUROPE(2),"
+ " AUSTRALIA(OCEANIA,3), KOREA(4), TAIWAN(5)@ and @CHINA(6)@."
+ " @RESTORE@ restores the original Nintendo values"
+ " and @NONE@ disables region patching (default)."
+ "\n "
+ " See https://wiimmfi.de/reg-list for other regions." },
+
+ { T_OPT_GP, "VS_REGION", "vs-region|vsregion|vregion",
+ "region",
+ "Same as {--region}, but only for online versus races." },
+
+ { T_OPT_GP, "BT_REGION", "bt-region|btregion|bregion",
+ "region",
+ "Same as {--region}, but only for online battles." },
+ // " If the region is prefixed by the letter @'x'@,"
+ // " than a fourth experimental place is patched too." },
+
+ { T_OPT_GO, "ALL_RANKS", "all-ranks|allranks",
+ "[=mode]",
+ "If set to @ON@ (default without parameter),"
+ " the server query to Nintendos servers is manipulated,"
+ " so that the player will find all players in online races"
+ " independent of their ranking points."
+ " Value @RESTORE@ disables this feature and restores Nintendos original query."
+ " Value @NONE@ disables this kind of patching (default)." },
+
+ { T_OPT_GP, "POINTS", "points|pts",
+ "list",
+ "This patch option " OPT_POINTS },
+
+ { H_OPT_CP, "CHEAT", "cheat",
+ "region",
+ "Change the output format and create a cheat code for the region."
+ " Allowed keywords: JAPAN; AMERICA, NTSC; EUROPE, AUSTRALIA, PAL; KOREA." },
+
+ { T_OPT_GP, "HTTPS", "https",
+ "mode",
+ "Patch the https strings of REL and DOL files."
+ " 'mode' is one of the following keywords:"
+ "\n"
+ "@RESTORE@ restores the original URLs and domains."
+ "\n"
+ "@HTTP@ replaces HTTPS requests by HTTP and sub-domain"
+ " '@naswii.@' by '@nas.@'."
+ "\n"
+ "@DOMAIN@ replace HTTPS requests by HTTP"
+ " and the domain '@nintendowifi.net@'"
+ " by a domain specified by option {--domain}."
+ "\n"
+ "@SAKE0@ same as DOMAIN, but don't replace URLs with SAKE domain."
+ "\n"
+ "@SAKE1@ same as SAKE0, but replace HTTPS of SAKE domains." },
+
+ { T_OPT_GP, "DOMAIN", "domain",
+ "dom",
+ "Define a domain for option {--https}."
+ " The default is '@wiimmfi.de@'." },
+
+ { T_OPT_G, "WIIMMFI", "wiimmfi",
+ 0,
+ "Patch the files for the new custom server."
+ " It is a short cut for {--https domain --domain wiimmfi.de}." },
+
+ { H_OPT_G, "TWIIMMFI", "twiimmfi",
+ 0,
+ "Patch the files for the test server."
+ " It is a short cut for {--https domain --domain test.wiimmfi.de}." },
+
+ { T_OPT_G, "WC24", "wc24",
+ 0,
+ "Exclude 2 strings of file StaticR.rel from --wiimmfi"
+ " and --domain patch to enable WC24 support." },
+
+ { H_OPT_GO, "WCODE", "wcode",
+ "[=mode]",
+ "Enable (mode=ON) or disable (mode=OFF) wiimmfi-code patching."
+ " Default mode is AUTO."
+ " In this case, patching is enabled if any WCODE is defined"
+ " or option --domain is set either to 'wiimmfi.de'"
+ " or to 'test.wiimmfi.de'." },
+
+ { H_OPT_CP, "ADD_WCODE", "@add-wcode|@addwcode",
+ "file",
+ "Each option call adds the filename to an internal list."
+ " Each file must be of type GCT and is added to the internal wcode stock."
+ "\n "
+ " If a single file is not found and the filename (not path)"
+ " contains at least 1 '@@' character, then all '@@' characters of"
+ " it are replaced by the region code (one of P,E,J,K) for a second try." },
+
+ { T_OPT_GP, "PB_MODE", "pb-mode|pbmode",
+ "mode",
+ "Mode for the patched-by string:"
+ " @OFF@ disables modifications."
+ " @RESET@ resets the string to stars."
+ " @WIIMMFI@ defines it only, if patched for Wiimmfi."
+ " @AUTO@ (default) defines it only, if patched."
+ " @ALWAYS@ defines it always." },
+
+ { H_OPT_GP, "PATCHED_BY", "@patched-by|@patchedby",
+ "string",
+ "Define a string for @patched-by@."
+ " Default is: @wstrt vVERSION rREVISION@" },
+
+ { T_OPT_GP, "VS", "vs",
+ "char",
+ "Reset (str is empty) or replace the second character of 'vs'"
+ " to create an own online world for versus races."
+ " The file StaticR.rel will be patched at 4 places." },
+
+ { H_OPT_GP, "VS2", "vs2",
+ "str",
+ "Reset (str is empty) or replace the 2 characters of 'vs'"
+ " to create an own online world for versus races."
+ " If the parameter contains only 1 character,"
+ " use 'v' as first character."
+ " The file StaticR.rel will be patched at 4 places."
+ "\n "
+ " Wiimmfi will only detect 'Versus' if the first letter is 'v' or 'V'." },
+
+ { T_OPT_GP, "BT", "bt",
+ "char",
+ "Reset (str is empty) or replace the second character of 'bt'"
+ " to create an own online world for battles."
+ " The file StaticR.rel will be patched at 4 places." },
+
+ { H_OPT_GP, "BT2", "bt2",
+ "str",
+ "Reset (str is empty) or replace the 2 characters of 'bt'"
+ " to create an own online world for battles."
+ " If the parameter contains only 1 character,"
+ " use 'b' as first character."
+ " The file StaticR.rel will be patched at 4 places."
+ "\n "
+ " Wiimmfi will only detect 'Battle' if the first letter is 'b' or 'B'." },
+
+ { T_OPT_GP, "CANNON", "cannon",
+ "idx,p1,p2,p3,p4",
+ "Patch parameters for cannon with index IDX (0..2)."
+ " Parameters P1..P4 are floating point numbers."
+ " Repeat this option for each cannon, that should be modified." },
+
+ { T_OPT_G, "MENO", "meno",
+ 0,
+ "Patch some 'MenuSingle' and 'MenuMulti' strings of file StaticR.rel"
+ " for online usage to 'MenO*' (MenuOnline)"
+ " to distinguish between offline and online races." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ 0, 0 /* copy of wszst */ },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "STD", "STD",
+ 0, 0 /* copy of wszst */ },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0, 0 /* copy of wszst */ },
+ #endif
+
+ { H_OPT_GM, "EXTRACT", "EXTRACT",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "DEST", "d|dest",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0, 0 /* copy of wszst */ },
+
+ { T_OPT_G, "CLEAN_DOL", "clean-dol|cleandol",
+ 0,
+ "Remove additional DOL sections, reset entry point and VBI address,"
+ " and try to restore other patches known by SZS tools."
+ " This is done after loading a DOL and before analysing"
+ " and patching to allow re-patching." },
+
+ { H_OPT_C, "ADD_LECODE", "add-lecode|addlecode",
+ 0,
+ "Add LE-CODE starter to main.dol." },
+
+ { T_OPT_C, "ADD_CTCODE", "add-ctcode|addctcode",
+ 0,
+ "If source is an original main.dol file of MKWii,"
+ " then append 2 sections (usually T2 and D8) with @CT-CODE@."
+ " The CTCODE is inserted after sections defined by {--add-section}"
+ " and then only, if there are no address collisions."
+ "\n "
+ " If {--ct-dir} is used, then files named"
+ " @rmc[ejp]/boot_code.bin@ and @boot_code.bin@ for T2,"
+ " and @rmc[ejp]/boot_data.bin@ and @boot_data.bin@ for D8"
+ " are searched." },
+
+ { T_OPT_GP, "CT_DIR", "ct-dir|ctdir",
+ "dir",
+ OPT_CT_DIR("") },
+
+ { T_OPT_C, "MOVE_D8", "move-d8|moved8",
+ 0,
+ "Move the @CT-CODE@ section D8 to another place"
+ " at the middle of binary."
+ " It is done automatically, if the original place overlaps"
+ " other existing sections." },
+
+ { T_OPT_CP, "ADD_SECTION", "add-section|addsection",
+ "file",
+ "Each option call adds the filename to an internal list."
+ " Each file must be of type GCT, GCH or WCH."
+ " All GCT files together are combined with an internal code handler"
+ " to one section (like a GCH file)."
+ " GCH and WCH define sections and patches. The defined sections"
+ " are added and VBI hooks are optionally initialized."
+ " Use option {--force} to allow overlapped sections."
+ " Use option {--verbose} up to 2 times for a log."
+ "\n "
+ " If a single file is not found and the filename (not path)"
+ " contains at least 1 '@@' character, then all '@@' characters of"
+ " it are replaced by the region code (one of P,E,J,K) for a second try."
+ "\n "
+ " The intention of this option is to add a Gecko Code Handler"
+ " and cheat codes to a main.dol for automatic execution."
+ "\1 See https://szs.wiimm.de/doc/addsect for details." },
+
+ { H_OPT_C, "FULL_GCH", "full-gch|fullgch",
+ 0,
+ "Use the full 'codehandler' instead of 'codehandleronly'." },
+
+ { H_OPT_C, "GCT_NO_SEP", "gct-no-sep|gctnosep",
+ 0,
+ "Ignore cheat code separators completly"
+ " and don't filter @'F0000001 0000xxxx'@ codes."
+ " Options --gct-sep and --gct-asm-sep are ignored too." },
+
+ { H_OPT_C, "GCT_SEP", "gct-sep|gctsep",
+ 0,
+ "Detect and remove cheat code separators"
+ " of format @'F0000001 0000xxxx'@."
+ " The separators are used to split the cheat codes"
+ " into several blocks if the total size is too large."
+ " ASM blocks are skipped if searching separators." },
+
+ { H_OPT_C, "GCT_ASM_SEP", "gct-asm-sep|gctasmsep",
+ 0,
+ "Detect the beginning of ASM blocks and use them"
+ " as cheat code separators."
+ " The separators are used to split the cheat codes"
+ " into several blocks if the total size is too large." },
+
+ { H_OPT_C, "GCT_LIST", "gct-list|gctlist",
+ 0,
+ "If GCT separators active, print a summary table about"
+ " the distribution of the segments."
+ " Be more verbose if set twice." },
+
+ { T_OPT_CO, "GCT_MOVE", "gct-move|gctmove",
+ "[=mode]",
+ "If a section is of type gecko code handler + cheat code, then make"
+ " the heap smaller and move the cheat codes before the FST section."
+ "\n "
+ " Parameter MODE is optional."
+ " If set, OFF disables and ON enables this feature."
+ " For mode AUTO (default) this feature is enabled,"
+ " if the cheat codes are too large or for internal reasons." },
+
+ { T_OPT_CP, "GCT_ADDR", "gct-addr|gctaddr",
+ "address",
+ "If {--gct-move} is active, a text section is created"
+ " to manage the code handling. This section is only needed at start"
+ " and is placed by default at address 0c802c0000"
+ " (good address for all 4 regions) as part of BSS."
+ " This option changes the start address of the section."
+ " If address is @0@ or invalid, then unused BSS space is searched." },
+
+ { T_OPT_CP, "GCT_SPACE", "gct-space|gctspace",
+ "size",
+ "Define the minimal space for the code part of {--gct-move}."
+ " This value is ignored,"
+ " if it is smaller than the size of the cheat codes."
+ " This option was only implemented to test the "
+ " memory allocation by {--gct-move} with large blocks." },
+
+ { T_OPT_CO, "ALLOW_USER_GCH", "allow-user-gch|allowusergch",
+ "[=mode]",
+ " This option is only relevant, if main.dol is patched for wiimmfi.de."
+ " It is dedicated to custom distribution creators for test purposes."
+ " If enabled, a user can load an own instance of Gecko Code Handler"
+ " and cheat codes and can use them online."
+ " If disabled, pachcing for online modus is disabled if an"
+ " alternative Gecko Code Handler is detected."
+ "\n "
+ " Parameter MODE is optional."
+ " If set, OFF disables and ON enables this feature."
+ " For mode AUTO (default) it depends on other options." },
+
+ { H_OPT_CP, "CREATE_SECT", "create-sect|createsect|cs",
+ "mode=file",
+ "Create a new DOL section by loading the binary file."
+ " MODE is a list of 'P' (parameter support),"
+ " 'T' or 'D' with optional digit (define section)"
+ " and an address (auto if not set)."
+ " The parts are separated by spaces or commas."
+ "\n "
+ " If MODE is 'P', then 4 32-bit parameters are expected at offset 0x10:"
+ " The section address at 0x10 (read),"
+ " the relative entry point at 0x14 (read, used if >0),"
+ " the original DOL entry point at 0x18 (written),"
+ " the address of the last defined '.dol' section at 0x1c (written)."
+ "\n "
+ " If the file name is '.dol', then it points not to a file."
+ " Instead a copy of the DOL header beginning with the section"
+ " addresses and ending behind the entry point (156B total) is copied."
+ " MODE 'P' is ignored for this section."
+ " All other MODE 'P' sections are updated at offset 0x1c."
+ "\n "
+ " --cs is a short cut." },
+
+ { H_OPT_CP, "WPF", "wpf",
+ "file",
+ "Each option call adds the filename to an internal list."
+ " Each file must be of type WPF (Wiimms Patch File) and defines"
+ " a list of conditionals and patches for staticr.rel and main.dol." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0, 0 /* copy of wszst */ },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "VADDR", "vaddr|va",
+ "RANGE",
+ "Comma separated list of virtual addresses to select the hex-dump ranges."
+ " Each element is either @ADDRESS@ (1 byte)"
+ " or @START:END@ or @START#SIZE@." },
+
+ { T_OPT_CP, "FADDR", "faddr|fa",
+ "RANGE",
+ "Comma separated list of file addresses to select the hex-dump ranges."
+ " Each element is either @ADDRESS@ (1 byte)"
+ " or @START:END@ or @START#SIZE@." },
+
+ { T_OPT_CP, "SNAME", "sname|sn",
+ "LIST",
+ "Comma separated list of section names to select the hex-dump ranges." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "INT1", "i1",
+ 0,
+ "Format: Print single bytes as integer number (default)." },
+
+ { T_OPT_C, "INT2", "i2",
+ 0,
+ "Format: Print each 2 bytes as integer number." },
+
+ { T_OPT_C, "INT3", "i3",
+ 0,
+ "Format: Print each 3 bytes as integer number." },
+
+ { T_OPT_C, "INT4", "i4",
+ 0,
+ "Format: Print each 4 bytes as integer number." },
+
+ { T_OPT_C, "INT5", "i5",
+ 0,
+ "Format: Print each 5 bytes as integer number." },
+
+ { T_OPT_C, "INT6", "i6",
+ 0,
+ "Format: Print each 6 bytes as integer number." },
+
+ { T_OPT_C, "INT7", "i7",
+ 0,
+ "Format: Print each 7 bytes as integer number." },
+
+ { T_OPT_C, "INT8", "i8",
+ 0,
+ "Format: Print each 8 bytes as integer number." },
+
+ { T_OPT_C, "FLOAT", "float",
+ 0,
+ "Format: Print each 4 bytes as floating point number." },
+
+ { T_OPT_C, "DOUBLE", "double",
+ 0,
+ "Format: Print each 8 bytes as double floating point number." },
+
+ { T_OPT_C, "LE", "le",
+ 0,
+ "Use little endian for binary data." },
+
+ { T_OPT_C, "BE", "be",
+ 0,
+ "Use big endian for binary data (default)." },
+
+ { T_OPT_C, "ZEROS", "zeros",
+ 0,
+ "Print integer numbers with leading zeros." },
+
+ { T_OPT_C, "HEX", "hex",
+ 0,
+ "Print integer numbers as hexadecimal numbers (default)." },
+
+ { T_OPT_C, "DEC", "dec",
+ 0,
+ "Print integer numbers as decimal numbers." },
+
+ { T_OPT_C, "C_SYNTAX", "c-syntax|csyntax",
+ 0,
+ "Print output in `C' syntax." },
+
+ { T_OPT_CP, "ADDR", "address",
+ "addr",
+ "Use @ADDR@ instead of null as start address for the dump." },
+
+ { T_OPT_C, "ALIGN", "align",
+ 0,
+ "Try to align the dump, so that the addresses (printed or not)"
+ " are multiple of bytes-per-line." },
+
+ { T_OPT_CP, "TRIGGER", "trigger",
+ "num",
+ "If the number @NUM@ is found and printed,"
+ " close the current line and start with a new one."
+ " If {--align} is set too,"
+ " continue the next line with the current column."
+ " The trigger works only for integer formats, but not for floats." },
+
+ { T_OPT_C, "NO_ADDR", "no-address|noaddress",
+ 0,
+ "Suppress the address column of the dump." },
+
+ { T_OPT_C, "NO_NUMBERS", "no-numbers|nonumbers",
+ 0,
+ "Suppress the numbers column of the dump." },
+
+ { T_OPT_C, "NO_TEXT", "no-text|notext",
+ 0,
+ "Suppress the text column of the dump." },
+
+ { T_OPT_C, "FORMAT", "format",
+ 0,
+ "Add @'#FORMAT:'@ info lines." },
+
+ { T_OPT_C, "NO_NULL", "no-null|nonull",
+ 0,
+ "Ignore data lines with NULL bytes only and"
+ " print a summary for each NULL block. (@'#NULL: ...'@)" },
+
+ { T_OPT_C, "NARROW", "narrow",
+ 0,
+ "Suppress the spaces that are usually inserted for readability." },
+
+ { T_OPT_C, "SMALL", "small",
+ 0,
+ "Each call will halve the number of bytes per line."
+ " Usually, 16 bytes per lines are reduced to 8, then to 4, 2 and 1."
+ " The effective number of bytes per line is format dependent." },
+
+ { T_OPT_C, "WIDE", "wide",
+ 0,
+ "Each call will round down the current bytes per line value"
+ " to the next multiple of 16 and then increment it by 16."
+ " Usually, 16 bytes per lines are enhanced to 32,"
+ " then to 48, 64, 80 and so on."
+ " The effective number of bytes per line is format dependent." },
+
+ { T_OPT_CP, "BYTES", "bytes",
+ "num",
+ "Print up to @NUM@ bytes per line instead of 16."
+ " The maximum allowed value is "
+ CONVERT_TO_STRING(XDUMP_MAX_BYTES_PER_LINE) "."
+ " The effective number of bytes per line is format dependent"
+ " (multiple of format size)." },
+
+
+ //
+ //---------- wstrt GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //---------- wstrt GROUP PATCH ----------
+
+ { T_GRP_BEG, "PATCH", 0,0,0 },
+
+ { T_COPT, "TRACKS", 0,0,0 },
+ { T_COPT, "ARENAS", 0,0,0 },
+ { T_COPT, "REGION", 0,0,0 },
+ { T_COPT, "VS_REGION", 0,0,0 },
+ { T_COPT, "BT_REGION", 0,0,0 },
+ { T_COPT, "ALL_RANKS", 0,0,0 },
+ { T_COPT, "HTTPS", 0,0,0 },
+ { T_COPT, "DOMAIN", 0,0,0 },
+ { T_COPT, "WIIMMFI", 0,0,0 },
+ { H_COPT, "TWIIMMFI", 0,0,0 },
+ { T_COPT, "PB_MODE", 0,0,0 },
+ { T_COPT, "WC24", 0,0,0 },
+ { H_COPT, "WCODE", 0,0,0 },
+ { T_COPT, "VS", 0,0,0 },
+ { H_COPT, "VS2", 0,0,0 },
+ { T_COPT, "BT", 0,0,0 },
+ { H_COPT, "BT2", 0,0,0 },
+ { T_COPT, "CANNON", 0,0,0 },
+ { T_COPT, "MENO", 0,0,0 },
+
+ //---------- wstrt GROUP HEXDUMP ----------
+
+ { T_GRP_BEG, "HEXDUMP", 0,0,0 },
+ { T_COPT, "INT1", 0,0,0 },
+ { T_COPT, "INT2", 0,0,0 },
+ { T_COPT, "INT3", 0,0,0 },
+ { T_COPT, "INT4", 0,0,0 },
+ { T_COPT, "INT5", 0,0,0 },
+ { T_COPT, "INT6", 0,0,0 },
+ { T_COPT, "INT7", 0,0,0 },
+ { T_COPT, "INT8", 0,0,0 },
+ { T_COPT, "FLOAT", 0,0,0 },
+ { T_COPT, "DOUBLE", 0,0,0 },
+ { T_COPT, "LE", 0,0,0 },
+ { T_COPT, "BE", 0,0,0 },
+ { T_COPT, "ZEROS", 0,0,0 },
+ { T_COPT, "HEX", 0,0,0 },
+ { T_COPT, "DEC", 0,0,0 },
+ { T_COPT, "C_SYNTAX", 0,0,0 },
+ { T_COPT, "ADDR", 0,0,0 },
+ { T_COPT, "ALIGN", 0,0,0 },
+ { T_COPT, "TRIGGER", 0,0,0 },
+ { T_COPT, "NO_ADDR", 0,0,0 },
+ { T_COPT, "NO_NUMBERS", 0,0,0 },
+ { T_COPT, "NO_TEXT", 0,0,0 },
+ { T_COPT, "FORMAT", 0,0,0 },
+ { T_COPT, "NO_NULL", 0,0,0 },
+ { T_COPT, "NARROW", 0,0,0 },
+ { T_COPT, "SMALL", 0,0,0 },
+ { T_COPT, "WIDE", 0,0,0 },
+ { T_COPT, "BYTES", 0,0,0 },
+
+ //
+ //---------- COMMAND wstrt VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wstrt HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wstrt ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wstrt TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wstrt COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wstrt ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wstrt FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wstrt FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wstrt _RAWDUMP ----------
+
+ { T_CMD_BEG, "RAWDUMP", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+
+ //---------- COMMAND wstrt DUMP ----------
+
+ { T_CMD_BEG, "DUMP", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "For DOL files:"
+ " If set, a second table with the image map is printed."
+ " If set twice, a third table with delta values is printed too." },
+
+ //---------- COMMAND wstrt HEXDUMP ----------
+
+ { T_CMD_BEG, "HEXDUMP", 0,0,0 },
+ { T_COPT, "VADDR", 0,0,0 },
+ { T_COPT, "FADDR", 0,0,0 },
+ { T_COPT, "SNAME", 0,0,0 },
+ { T_COPT, "LOGGING", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "HEXDUMP", 0,0,0 },
+
+ //---------- COMMAND wstrt CDUMP ----------
+
+ { T_CMD_BEG, "CDUMP", 0,0,0 },
+
+ //---------- COMMAND wstrt HTTPS ----------
+
+ { T_CMD_BEG, "HTTPS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ " Print output a C source" },
+ { T_COPT, "VERBOSE", 0,0,
+ " Print hex dump if an entry differs." },
+
+ //---------- COMMAND wstrt EXTRACT ----------
+
+ { T_CMD_BEG, "EXTRACT", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+
+ //---------- COMMAND wstrt TRACKS ----------
+
+ { T_CMD_BEG, "TRACKS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Add columns for music slot and short name." },
+ { T_COPT, "DE", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wstrt ARENAS ----------
+
+ { T_CMD_BEG, "ARENAS", 0,0,0 },
+ { T_COPY_CMD, "TRACKS", 0,0,0 },
+
+ //---------- COMMAND wstrt FILES ----------
+
+ { T_CMD_BEG, "FILES", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wstrt FIND ----------
+
+ { T_CMD_BEG, "FIND", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Add a user friendly track or arena name at the end of each line."
+ " If set twice, add also the file names of the track and sound files"
+ " before the track name."
+ " If set three times, add the slot index and the internal index"
+ " (both zero based) before the file names." },
+ { T_COPT, "DE", 0,0,0 },
+
+ //---------- COMMAND wstrt POINTS ----------
+
+ { T_CMD_BEG, "POINTS", 0,0,0 },
+ { T_COPT, "POINTS", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print the table as comma separated lists in C notation." },
+ { T_COPT, "LONG", 0,0,
+ "Append a string in {--points} format that defines the table."
+ " If set twice, append up to 3 strings in different modes." },
+ { H_COPT, "CHEAT", 0,0,0 },
+
+ //---------- COMMAND wstrt ANALYZE ----------
+
+ { T_CMD_BEG, "ANALYZE", 0,0,0 },
+ { T_COPT, "CLEAN_DOL", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print different lists if bugs found."
+ " If set twice, print the lists always." },
+
+ //---------- COMMAND wstrt PATCH ----------
+
+ { T_CMD_BEG, "PATCH", 0,0,0 },
+
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "CLEAN_DOL", 0,0,0 },
+ { T_COPY_GRP, "PATCH", 0,0,0 },
+ { H_COPT, "ADD_LECODE", 0,0,0 },
+ { T_COPT, "ADD_CTCODE", 0,0,0 },
+ { T_COPT, "CT_DIR", 0,0,0 },
+ { T_COPT, "MOVE_D8", 0,0,0 },
+ { T_COPT, "ADD_SECTION", 0,0,0 },
+ { H_COPT, "ADD_WCODE", 0,0,0 },
+ { H_COPT, "FULL_GCH", 0,0,0 },
+ { H_COPT, "GCT_NO_SEP", 0,0,0 },
+ { H_COPT, "GCT_SEP", 0,0,0 },
+ { H_COPT, "GCT_ASM_SEP", 0,0,0 },
+ { H_COPT, "GCT_LIST", 0,0,0 },
+ { T_COPT, "GCT_MOVE", 0,0,0 },
+ { T_COPT, "GCT_ADDR", 0,0,0 },
+ { T_COPT, "GCT_SPACE", 0,0,0 },
+ { T_COPT, "ALLOW_USER_GCH",0,0,0 },
+ { T_COPT, "FORCE", 0,0,
+ "Accept overlapped sections.\n>>> THE RESULT IS MOST LIKELY INVALID! <<<" },
+ { H_COPT, "CREATE_SECT", 0,0,0 },
+ { H_COPT, "WPF", 0,0,0 },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/tab-wszst.inc b/project/src/ui/tab-wszst.inc
new file mode 100644
index 0000000..4dcea57
--- /dev/null
+++ b/project/src/ui/tab-wszst.inc
@@ -0,0 +1,3238 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+//
+/////////////////////////////////////////////////////////////////////////////
+///////////// wszst /////////////
+/////////////////////////////////////////////////////////////////////////////
+
+ { T_DEF_TOOL, "wszst", 0,
+ "wszst [option]... command [option|parameter|@file]...",
+ WSZST_LONG " :"
+ " List, compare, (de-)compress, extract and create"
+ " " ARCHIVES_AND " archives."
+ " It is also a wrapper to all other tools." },
+
+ //
+ //---------- list of all wszst commands ----------
+
+ { T_DEF_CMD, "VERSION", "VERSION",
+ "wszst VERSION [ignored]...",
+ "Print program name and version and exit." },
+
+ { T_DEF_CMD, "HELP", "HELP|H|?",
+ "wszst HELP [--width=wd] OPT|OPTION [option]...\n"
+ "wszst HELP [--width=wd] CMD|COMMAND ...\n"
+ "wszst HELP [--width=wd] command ...\n"
+ "wszst HELP [--width=wd] ...",
+ "Print help for commands and options."
+ "\f" // <-------- separator: before built-in help & below full help
+ "Print help for commands and options."
+ "\n "
+ " The first variant (with keyword @OPT@ or @OPTION@)"
+ " prints a list of all global and command specific options."
+ " If at least one option is set,"
+ " only info about the declared options are printed."
+ " The second variant (with keyword @CMD@ or @COMMAND@)"
+ " prints an overview about all commands."
+ " The third variant (with a valid command name)"
+ " prints details about the declared command."
+ " The fourth variant prints an overview about all commands"
+ " and all global options." },
+
+ { T_DEF_CMD, "ARGTEST", "ARGTEST",
+ "wszst ARGTEST ...",
+ "This debug command accepts all kinds of parameters"
+ " and prints one line for each parameter." },
+
+ { T_DEF_CMD, "TEST", "TEST",
+ "wszst TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters"
+ " and prints a list of the internal option values."
+ " The command is designed to test the option parameters."
+ " The non option parameters are completely ignored." },
+
+ { T_DEF_CMD, "COLORS", "COLORS",
+ "wszst COLORS",
+ "Ignore all parameters and print colored text for testing." },
+
+ { T_DEF_CMD, "ERROR", "ERROR|ERR",
+ "wszst ERROR [error_code]",
+ "Translate an exit code to a message name."
+ " If no exit code is entered, print a table with all error messages." },
+
+ { T_DEF_CMD, "FILETYPE", "FILETYPE|FT",
+ "wszst FILETYPE file...",
+ "Scan the header of the entered files and print file type"
+ " and path for each file as list." },
+
+ { T_DEF_CMD, "FILEATTRIB", "FILEATTRIB|FA",
+ "wszst FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types."
+ " If at least one keyword is entered, only matching file types"
+ " are printed."
+ " A keyword is either a file type (like 'BRRES' or 'BMG')"
+ " or one of the printed keywords (like 'ARCHIVE' or 'EXTRACT')." },
+
+ { T_DEF_CMD, "BRSUB", "BRSUB",
+ "wszst BRSUB [file]...",
+ " If no file is defined, print a table with known BRRES"
+ " sub files consisting of"
+ " file format, version, number of sections and warn level."
+ " Otherwise analyse the version numbers of each BRRES sub file"
+ " of each source and print warnings about invalid versions." },
+
+ { T_DEF_CMD, "SYMBOLS", "SYMBOLS",
+ "wszst SYMBOLS",
+ "Print predefined symbols of text parser to standard output." },
+
+ { T_DEF_CMD, "FUNCTIONS", "FUNCTIONS",
+ "wszst FUNCTIONS [key]...",
+ "Print a list with all parser functions."
+ " If one or more keys entered,"
+ " then only functions that match at least one key are printed." },
+
+ { T_DEF_CMD, "CALCULATE", "CALCULATE",
+ "wszst CALCULATE expression...",
+ "Calculate each expression and print the result to standard output." },
+
+ { T_DEF_CMD, "MATRIX", "MATRIX",
+ "wszst MATRIX [patch-option]... [vector]...",
+ "Use the transformation options as base and calculate and print"
+ " the related vectors and the transformation matrices."
+ " Then do a forward and backward transformation for each @vector@"
+ " parameter using the matrices and print the results."
+ "\f" // <-------- separator: before built-in help & below full help
+ "Use the transformation options as base and calculate and print"
+ " the related vectors and the transformation matrices."
+ " Then do a forward and backward transformation for each @vector@"
+ " parameter using the matrices and print the results."
+ " The transformations are done with 4 different methods"
+ " to confirm the algorithms."
+ " Only the main results and results, which differ, are printed."
+ "\n"
+ " Normally, the exit status is @OK@ (null)."
+ " If at least one old transformation returns different results"
+ " for the different algorithms,"
+ " then status @DIFFER@ (not null) is returned." },
+
+ { T_DEF_CMD, "FLOAT", "FLOAT",
+ "wszst FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa."
+ " For each non empty parameter, a line with 4 bytes hex and a float,"
+ " 8 bytes hex and a double float, and the parameter itself is printed."
+ " If a parameter begins with 'x' or '0x', it is a hex string,"
+ " otherwise it is a floating point number."
+ "\n "
+ " The special parameters \"+\" and \"-\" mean:"
+ " Increment or decrement the previous value by the smallest"
+ " possible value. Use different increments for floats and doubles."
+ "\n "
+ " All conversions are done using big endian." },
+
+ { T_DEF_CMD, "VR_CALC", "VR-CALC|VRCALC",
+ "wszst VR-CALC delta...",
+ " Calculate a VR increment for each given delta value"
+ " (@=VR_winner-VR_loser@). Print results as table." },
+
+ { T_DEF_CMD, "VR_RACE", "VR-RACE|VRRACE",
+ "wszst VR-RACE vr1 vr2...",
+ "Print a table with VR calculations for a race."
+ " Each @VR@ is the current rating of a player."
+ " The vr-list is well ordered: "
+ " The first VR is for the winner and the last VR for the looser."
+ " Up to 30 VR values will be accpeted."
+ " Each VR can be preceeded by @\"NUM*\"@ to define a repeat factor." },
+
+ { T_DEF_CMD, "AUTOADD", "AUTOADD",
+ "wszst AUTOADD [source]...",
+ "Manage the auto-add library."
+ " Primarily add files to the main auto-add archive for future"
+ " use of option {--auto-add} or to convert WU8 files."
+ " If @SOURCE@ is a directory, all standard track and arena"
+ " file names are searched for the missed auto-add files."
+ " Without source files, the status of the auto-add archive is printed."
+ "\n "
+ " Try {wszst AUTOADD ./path_to/Race/Course/}"
+ " to add all supported files." },
+
+ { T_DEF_CMD, "TRACKS", "TRACKS",
+ "wszst TRACKS [selection_mask]",
+ "Print a list of all known track SZS files of Mario Kart"
+ " internal directory './Race/Course'."
+ " These files are 32 standard track files and 10 arena files."
+ " The first column shows an unique ID of exact 3 upper case"
+ " characters or digits. For '_d' files, a 'd' is appended."
+ " The second column shows the internal file name."
+ " Use BMG files to print real names as third column." },
+
+ { T_DEF_CMD, "SCANCACHE", "SCANCACHE",
+ "wszst SCANCACHE directory\n"
+ "wszst SCANCACHE --cache directory",
+ "Scan the cache directory for SZS files and re-build the"
+ " checksum table. Store the result as file 'cache-content.txt'"
+ " in the same directory."
+ " The file is used by option {--cache} to optimize file access." },
+
+ { H_DEF_CMD, "EXPORT", "_EXPORT",
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output."
+ " Use keyword @HELP@ to get a list of possible keywords." },
+
+ { H_DEF_CMD, "CODE", "_CODE",
+ "wszst _CODE [files]",
+ "All bytes of all input files are xor'ed with 0xDC and copied to stdout."
+ " If no source file is given, standard input is read." },
+
+ { H_DEF_CMD, "RECODE", "_RECODE",
+ "wszst _RECODE mode [files]",
+ "All bytes of all input files are interpreted as 1 file and re-coded."
+ " @MODE@ defines the re-code mode."
+ " If no source file is given, standard input is read." },
+
+ { H_DEF_CMD, "SUBFILE", "_SUBFILE",
+ "wszst _SUBFILE [files]",
+ "Test sub-file system." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "LIST", "LIST|LS",
+ "wszst LIST [source]...",
+ "List all sub files of " ARCHIVES_AND " archives."
+ " If listing a directory, then a virtual SZS file"
+ " is created (like CREATE does it) and listed." },
+
+ { T_DEF_CMD, "LIST_L", "LIST-L|LL|LISTL",
+ "wszst LIST-L [source]...",
+ "List all sub files with size."
+ " 'LIST-L' and 'LL' are short cuts for {LIST --long}." },
+
+ { T_DEF_CMD, "LIST_LL", "LIST-LL|LLL|LISTLL",
+ "wszst LIST-LL [source]...",
+ "List all sub files with offset and size."
+ " 'LIST-LL' and 'LLL' are short cuts for {LIST --long --long}." },
+
+ { T_DEF_CMD, "LIST_LLL", "LIST-LLL|LLLL|LISTLLL",
+ "wszst LIST-LLL [source]...",
+ "List all sub files with offset and size in debugging mode."
+ " 'LIST-LLL' and 'LLLL' are short cuts"
+ " for {LIST --long --long --long}." },
+
+ { T_DEF_CMD, "LIST_A", "LIST-A|LA|LISTA",
+ "wszst LIST-A [source]...",
+ "List recursive all sub files with size."
+ " 'LIST-A' and 'LA' are short cuts for {LIST --long --all --all}." },
+
+ { T_DEF_CMD, "LIST_LA", "LIST-LA|LLA|LISTLA",
+ "wszst LIST-LA [source]...",
+ "List recursive all sub files with offset and size."
+ " 'LIST-LA' and 'LLA' are short cuts"
+ " for {LIST --long --long --all --all}." },
+
+ { T_DEF_CMD, "NAME_REF", "NAME-REF|NAMEREF",
+ "wszst NAME-REF [source]...",
+ "For each BRRES file or subfile, create a name based cross reference"
+ " and print the result as list ordered by names in BRRES order."
+ " For U8 archives (e.g. track SZS files),"
+ " sub file @course_model.brres@ is analysed." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "ILIST", "ILIST|IL",
+ "wszst ILIST [source]...",
+ "List the images files of all sub files of " ARCHIVES_AND
+ " archives; non image files are ignored."
+ " If listing a directory, then a virtual SZS file"
+ " is created (like CREATE does it) and listed." },
+
+ { T_DEF_CMD, "ILIST_L", "ILIST-L|ILL|ILISTL",
+ "wit ILIST-L [source]...",
+ "List all image files with geometry data."
+ " 'ILIST-L' and 'ILL' are short cuts for {ILIST --long}." },
+
+ { T_DEF_CMD, "ILIST_LL", "ILIST-LL|ILLL|ILISTLL",
+ "wit ILIST-LL [source]...",
+ "List all sub files with advanced geometry data."
+ " 'ILIST-LL' and 'ILLL' are short cuts for {ILIST --long --long}." },
+
+ { T_DEF_CMD, "ILIST_A", "ILIST-A|ILA",
+ "wszst ILIST-A [source]...",
+ "List recursive all image files."
+ " 'ILIST-A' and 'ILA' are short cuts for {ILIST --all}." },
+
+ { T_DEF_CMD, "ILIST_LA", "ILIST-LA|ILLA|ILISTLA",
+ "wit ILIST-LA [source]...",
+ "List recursive all image files with geometry data."
+ " 'ILIST-LA' and 'ILLA' are short cuts for {ILIST --long --all}." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "MEMORY", "MEMORY|MEM",
+ "wszst MEMORY [source]...",
+ "Dump a memory map of each source file."
+ " Virtual images (extracted directories) are also supported." },
+
+ { T_DEF_CMD, "MEMORY_A", "MEMORY-A|MEMA",
+ "wszst MEMORY-A [source]...",
+ "Dump recursive a memory map of each source file."
+ " 'MEMORY-A' and 'MEMA' are short cuts for {MEMORY --all --all}." },
+
+ { T_DEF_CMD, "DUMP", "DUMP",
+ "wszst DUMP [source]...",
+ "Dump the internal structure of a BRRES files, compressed or not."
+ " Other archives are ignored."
+ " The main goal is to verify string relocation."
+ " Virtual images (extracted directories) are also supported." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "SHA1", "SHA1",
+ "wszst SHA1 [source]...",
+ "Print a SHA1 checksum for each source."
+ " The checksum is calculated by using the uncompressed data." },
+
+ { T_DEF_CMD, "ANALYZE", "ANALYZE|ANA|ANALYSE",
+ "wszst ANALYZE [source]...",
+ "Analyse track files and print results in machine readable format." },
+
+ { T_DEF_CMD, "DISTRIBUTION", "DISTRIBUTION|DIST",
+ "wszst DISTRIBUTION result source...\n"
+ "wszst DISTRIBUTION directory [source]...",
+ "Load each @SOURCE@ (SZS, WBZ, U8 or WU8) and calculate a checksum"
+ " of the uncompressed data."
+ " If @SOURCE@ is a directory, scan it for SZS, WBZ, U8 and WU8 files."
+ " If a source directory starts with \"arena\","
+ " all tracks of the directory are assumed to be battle arenas."
+ " Finally print the results into file @RESULT@."
+ "\n "
+ " The default name for @RESULT@ is \"distribution.txt\"."
+ " Extension .txt is appended to the filename if not defined."
+ " If @RESULT@ is a directory, it is used as first source too."
+ "\n "
+ " If file @RESULT@ exists, it is automatically added as last source"
+ " to the list of option --source, but only if not already added."
+ " On scanning of file @result@, parameters are scanned too." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "DIFF", "DIFF|CMP",
+ "wszst DIFF source1 source2\n"
+ "wszst DIFF source... --dest dest",
+ "Compare two or more sources (each " ARCHIVES_COMMA " or directory)"
+ " on file level and report mismatches for each sub file."
+ " If option {--dest} is set, then each source file"
+ " is compared with a file in the destination." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "CHECK", "CHECK",
+ "wszst CHECK [source]...",
+ "Make a validity check for track files:"
+ " Try to read KCL and KMP (and check both) and find unknown, modified,"
+ " needed and unneeded files."
+ " Also analyse cannons and make slot proposals."
+ " This command uses an internal object and file database."
+ " The source can be a SZS, U8, WU8 or WBZ file, or an U8 like directory." },
+
+ { T_DEF_CMD, "SLOTS", "SLOTS",
+ "wszst SLOTS [source]...",
+ "Try to find out the slots, that will run a track."
+ " Each source can be a SZS, U8, WU8 or WBZ file, or an U8 like directory."
+ " For each source one status line is printed."
+ " The status line contains either a positive or a negative"
+ " slot list, whatever is shorter."
+ " For battle arenas, the keyword @ARENA@ is printed." },
+
+ { T_DEF_CMD, "STGI", "STGI",
+ "wszst STGI [source]...",
+ "Find the first KMP:STGI of each file"
+ " and print an analysis of it as single line statistic."
+ " Additional the number of lap counter check points ('LC') is printed."
+ " Track and KMP (binary and text) files are accepted as input." },
+
+ { T_DEF_CMD, "ISARENA", "ISARENA",
+ "wszst ISARENA [source]...",
+ "Analyse each track for its arena status and print a line with"
+ " a status code and the track name."
+ " The status code is: »-RACE« for a racing track,"
+ " »?MAYBE« for likely an arena, »+ARENA« for an arena,"
+ " »+DISPATCH« for an arena with dispatch points"
+ " or any error hint beginning with an »!«."
+ " So the very first character (one of »!-?+«)"
+ " can be used to distinguish the status class."
+ "\n "
+ " The exit status is >2 on error,"
+ " 2 (DIFFER), if at least one file is a racing track,"
+ " or 0 (OK), if all sources are arenas." },
+
+ { T_DEF_CMD, "NORMALIZE", "NORMALIZE|NORM",
+ "wszst NORMALIZE [source]...",
+ "Normalize an U8 archive, compressed or not:"
+ " The files are sorted in `Nintendo like' order"
+ " and unused data holes are removed."
+ " If directory '.' is available it becomes the root directory"
+ " for all others. Compressed sources are compressed again with"
+ " maximum compression (level 9)."
+ " The destination is only written if any data changed."
+ "\n "
+ " {wszst NORMALIZE} is the same as {wszst PATCH --norm}." },
+
+ { T_DEF_CMD, "PATCH", "PATCH",
+ "wszst PATCH [source]...",
+ "Patch an U8 archive, compressed or not:"
+ " Load the archive, apply all patching and transforming options"
+ " and store the file again."
+ " Compressed sources are compressed again."
+ " The destination is only written if any data changed." },
+
+ { T_DEF_CMD, "COPY", "COPY|CP",
+ "wszst COPY source dest\n"
+ "wszst COPY source... [-d|-D] dest",
+ "COPY is an alternative command for copying and patching files."
+ " It uses the same internal procedure as command PATCH,"
+ " but has another command line syntax."
+ "\n "
+ "The command copies all source files to the destination."
+ " If more than 1 source is defined, the destination must be"
+ " either a directory or a destination filename with escapes."
+ " Patching is also possible and option --overwrite is set implicitly." },
+
+ { T_DEF_CMD, "DUPLICATE", "DUPLICATE|DUP",
+ "wszst DUPLICATE source [-d|-D] dest",
+ "The command reads a single track file and duplicates it several"
+ " times to DEST. Therefor it analyzes the presence flags combinations"
+ " with and without extension support and creates one file for each"
+ " relevant scenario. A LEX section TEST will be inserted to force"
+ " the execution mode for offline tests."
+ "\n "
+ " The destination filename (not directory part) is searched"
+ " for the first occurance of @'@@'@."
+ " If not found, the place before the last point is used."
+ " At this place an identification string is inserted."
+ "\n "
+ " Depending on option {--gamemodes} up to " MAX_GAMEMODES
+ " files will be created. So the use of option {--fast}"
+ " is recommended to speed up the process."
+ " Use command {wkmpt GAMEMODES} to list all variants"
+ " and to check them beforehand." },
+
+ { T_DEF_CMD, "MINIMAP", "MINIMAP",
+ "wszst MINIMAP [source]...",
+ "Print minimap data (more exact: the visual field of the minimap)"
+ " of a SZS, U8, BRRES or MDL file."
+ " If patching options are used, modify the data and write back"
+ " the file using its original file format."
+ " Only the translation vector is modified and"
+ " new translation and inverse matrices are calculated." },
+
+ { T_DEF_CMD, "COMPRESS", "COMPRESS|COM",
+ "wszst COMPRESS [source]...",
+ "Compress and create a SZS archives."
+ " If the source is already compressed,"
+ " then decompress and compress it again."
+ " The default destination is @'%P/%N.szs'@." },
+
+ { T_DEF_CMD, "DECOMPRESS", "DECOMPRESS|DEC",
+ "wszst DECOMPRESS [szs]...",
+ "Decompress SZS files."
+ " The default destination is @'%P/%N.u8'@." },
+
+ { T_DEF_CMD, "ENCODE", "ENCODE|E",
+ "wszst ENCODE [source_dir]...",
+ " Create and/or encode sub files if necessary."
+ " It works like command CREATE,"
+ " but without creating a new first level archive file." },
+
+ { T_DEF_CMD, "CREATE", "CREATE|C",
+ "wszst CREATE [source_dir]...",
+ "Create " ARCHIVES_OR " archives by adding all not hidden files"
+ " of the directory structure."
+ " Create and/or encode sub files if necessary."
+ " The default destination is @'%P/%N%T'@." },
+
+ { T_DEF_CMD, "UPDATE", "UPDATE|U",
+ "wszst UPDATE [source]... [--source=] [--dest=]",
+ "Update an existing " ARCHIVES_AND "archive."
+ " This is done in similar way as the {EXTRACT} command,"
+ " but instead of extracting, source files are searched"
+ " in a prior extracted archive."
+ " Only files with the same size are updated."
+ " The secondary source is used to find the source sub files."
+ " The default secondary source is @'%P/%N.d/'@." },
+
+ { T_DEF_CMD, "EXTRACT", "EXTRACT|X",
+ "wszst EXTRACT [source]...",
+ "Extract all sub files of " ARCHIVES_AND " archives."
+ " The default destination is @'%P/%N.d/'@." },
+
+ { T_DEF_CMD, "XDECODE", "XDECODE|XD",
+ "wszst XDECODE [source]...",
+ "Command @XDECODE@ is a short cut for {EXTRACT --decode}."
+ " It extract all sub files of " ARCHIVES_AND " archives"
+ " and decodes all supported files."
+ " The default destination is @'%P/%N.d/'@." },
+
+ { T_DEF_CMD, "XEXPORT", "XEXPORT|XX",
+ "wszst XEXPORT [source]...",
+ "Command @XEXPORT@ is a short cut for {EXTRACT --decode --export}."
+ " It extract all sub files of " ARCHIVES_AND " archives"
+ " and decodes all supported files with enabled export mode."
+ " The default destination is @'%P/%N.d/'@." },
+
+ { T_DEF_CMD, "XALL", "XALL|XA",
+ "wszst XALL [source]...",
+ "Command @XALL@ is a short cut for {EXTRACT --all}."
+ " It extract all sub files of " ARCHIVES_AND " archives"
+ " recursively and decodes all supported files."
+ " The default destination is @'%P/%N.d/'@." },
+
+ { T_DEF_CMD, "XCOMMON", "XCOMMON",
+ "wszst XCOMMON [source]...",
+ "Command @XCOMMON@ is a short cut for {EXTRACT --basedir=common}."
+ " Scan archives and extract files from archives, that are below"
+ " directory @'common'@."
+ " The default destination is @'%P/%N.d/'@." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { T_DEF_CMD, "BINARY", "BINARY|BIN",
+ "wszst BINARY [source]...",
+ "Read each source file (binary or text, but never archives)"
+ " and write the content as binary file."
+ " The file extension of the new file depends on the file type,"
+ " but is usually @.bin@."
+ " Currently supported file formats are @BMG@, @GEOHIT@, @ITEMSLOT@,"
+ " @KCL@, @KMG@, @KMP@, @LEX@, @OBJFLOW@, @PAT@"
+ " and the related text formats." },
+
+ { T_DEF_CMD, "TEXT", "TEXT|TXT",
+ "wszst TEXT [source]...",
+ "Read each source file (binary or text, but never archives)"
+ " and write the content as text file."
+ " The file extension of the new file is usually @.txt@."
+ " Currently supported file formats are @BMG@, @GEOHIT@, @ITEMSLOT@,"
+ " @KCL@, @KMG@, @KMP@, @LEX@, @OBJFLOW@, @PAT@"
+ " and the related text formats." },
+
+ { T_DEF_CMD, "CAT", "CAT",
+ "wszst CAT [source/subfile]...",
+ "Extract one or more sub files of " ARCHIVES_AND " archives."
+ " The output of all source files is concatenated and written to stdout." },
+
+ { T_DEF_CMD, "BMG", "BMG",
+ "wszst BMG [source]...",
+ "For each archive all BMG sub files are searched"
+ " and, if found, decoded and printed as combined BMG text file."
+ " The command works exactly like {wbmgt MIX}." },
+
+ { T_DEF_CMD, "KCL", "KCL",
+ "wszst KCL [source]...",
+ "For each archive the KCL sub file @course.kcl@ is searched"
+ " and, if found, decoded and printed (copied to stdout)."
+ "\n "
+ " Automated dropping of bad KCL triangles is enabled"
+ " if no other drop option is specified by option {--kcl}." },
+
+ { T_DEF_CMD, "KMP", "KMP",
+ "wszst KMP [source]...",
+ "For each archive the KMP sub file @course.kmp@ is searched"
+ " and, if found, decoded and printed (copied to stdout)." },
+
+ { T_DEF_CMD, "LEX", "LEX",
+ "wszst LEX [source]...",
+ "For each archive the LEX sub file @course.lex@ is searched"
+ " and, if found, decoded and printed (copied to stdout)." },
+
+ { T_DEF_CMD, "INFO", "INFO",
+ "wszst INFO [source]...",
+ "For each archive a file named @info.txt@ and, if not found,"
+ " @credits.txt@ is searched, ignoring case."
+ " The first found file of each archive is printed (copied to stdout)." },
+
+ { H_DEF_CMD, "GHOST", "GHOSTS",
+ "wszst GHOST [source]...",
+ "Analyse each file and print a summary about the ghost data." },
+
+ { T_DEF_CMD, "YAZDUMP", "YAZDUMP|YD",
+ "wszst YAZDUMP [szs]...",
+ "Analyze YAZ compression print a dump to stdout."
+ " Ignore files without YAZ compression." },
+
+ { T_SEP_CMD, 0,0,0,0 }, //----- separator -----
+
+ { H_DEF_CMD, "VEHICLE", "VEHICLE",
+ "wszst VEHICLE job ...",
+ "Hidden vehicle settings command." },
+
+ //
+ //---------- list of all wszst options ----------
+
+ { T_OPT_S, "VERSION", "V|version",
+ 0,
+ "Stop parsing the command line, print a version info and exit." },
+
+ { T_OPT_S, "HELP", "h|help",
+ 0,
+ "Stop parsing the command line, print a help message and exit." },
+
+ { T_OPT_S, "XHELP", "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message"
+ " with all commands included. Exit after printing." },
+
+ { T_OPT_G, "ALLOW_ALL", "allow-all|allowall",
+ 0,
+ "Usually commands accept only options with impact to the command."
+ " All other options fire a syntax error."
+ " But if @--allow-all@ is set, all commands accept all options."
+ "\n "
+ " This makes changing the command of a long command line"
+ " without removing useless options easier."
+ " It also helps to override wrong option permissions." },
+
+ { T_OPT_GP, "COMPATIBLE", "compatible",
+ "vers",
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@)"
+ " or a revision number (format @'r#'@) as parameter."
+ " If set, the tools try to create BMG and KMP text files,"
+ " that are compatible to the entered version of the tools."
+ " This may override other legacy options." },
+
+ { T_OPT_GP|F_IGNORE,
+ "WIDTH", "width",
+ "width",
+ "Define the terminal width (number of columns)"
+ " for help and some other messages"
+ " and disable the automatic detection of the terminal width." },
+
+ { T_OPT_GM, "QUIET", "q|quiet",
+ 0,
+ "Be quiet and print only error messages."
+ " Multiple usage is possible."
+ " The impact is command dependent."
+ " In general: If set three times,"
+ " different file format warnings are suppressed." },
+
+ { T_OPT_GM, "VERBOSE", "v|verbose",
+ 0,
+ "Be verbose and print more progress information."
+ " Multiple usage is possible."
+ " The impact is command dependent." },
+
+ { T_OPT_GM, "LOGGING", "L|logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps." },
+
+ { T_OPT_G, "DE", "de",
+ 0,
+ "Use german track and arena names." },
+
+ { T_OPT_GO|F_IGNORE,
+ "COLORS", "colors",
+ "[=modus]",
+ "Define the modus for colored text output."
+ " Allowed keywords are:"
+ " @OFF@ or @NO-COLORS@ to disable colors,"
+ " @AUTO@ (default) for automatic detection,"
+ " @ON@ for automatic detection but never @OFF@,"
+ " @8-COLORS@ and @256-COLORS@ to force 8 or 256 color support."
+ " Without parameter, @ON@ is used."
+ "\n "
+ " @AUTO@ will enable colorized output only for terminals."
+ " @AUTO@ and @ON@ use environment variable @TERM@"
+ " to find the correct color modus."
+ "\n "
+ " If a command is prefixed by @'C-'@,"
+ " then @--color=ON@ is used implicitly as default." },
+
+ { T_OPT_G|F_IGNORE,
+ "NO_COLORS", "no-colors|nocolors",
+ 0,
+ "Deactive colorized text."
+ " This is the default, if an output file is not a terminal." },
+
+ { T_OPT_G, "CT_CODE", "ct-code|ctcode",
+ 0,
+ "Enable CT-CODE support."
+ "\1 See https://szs.wiimm.de/opt/ctcode for details." },
+
+ { T_OPT_GO, "LE_CODE", "le-code|lecode",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support."
+ " The optional parameter is deprecated and ignored."
+ "\1 See https://szs.wiimm.de/opt/lecode for details." },
+
+ { T_OPT_GMP, "CHDIR", "chdir",
+ "dir",
+ "Set a new working directory for all following options,"
+ " for all parameters and for the command execution."
+ " This option can be used multiple times,"
+ " but for parameter parsing and for command execution only"
+ " the last usage is relevant."
+ " Nevertheless, @'@@param'@ values are scanned while reading"
+ " the command line." },
+
+ { T_OPT_GMP, "CONST", "c|const",
+ "list",
+ "Define constant values, that are used by the internal encoders"
+ " and by the numeric options as predefined global variables."
+ " This option allows a conditional encoding of text files."
+ " It can be used multiple times for multiple definitions."
+ "\n "
+ " The parameter is a comma separated list of terms"
+ " and a term is '@name=expression@'."
+ " The expression is calculated by the text parser." },
+
+ { T_OPT_C, "TOUCH", "touch",
+ 0,
+ "Mark the minimap as modified to force a new calculation"
+ " of the translation and inverse matrices." },
+
+ { T_OPT_C, "AUTO", "auto",
+ 0,
+ "Calculate the minimap translations automatically by"
+ " using the minimum and maximum vertex coordinates."
+ " The 'scale' and 'rotation' fields are reset."
+ " This is done as first action"
+ " before the SET, CENTER and the other transformations." },
+
+ { T_OPT_CP, "SET_FLAGS", "set-flags|setflags",
+ "flag",
+ "Define the flag values (default 0x31f) of the minimap." },
+
+ { T_OPT_CP, "SET_SCALE", "set-scale|setscale",
+ "vector",
+ "Define the scale values (default 1.0) of the minimap."
+ " The parameter is either a vector expression"
+ " or a comma separated list of coordinates ('x,z' or 'x,y,z')." },
+
+ { T_OPT_CP, "SET_ROT", "set-rot|setrot",
+ "vector",
+ "Define the rotation values (default 0.0) of the minimap."
+ " The parameter is either a vector expression"
+ " or a comma separated list of coordinates ('x,z' or 'x,y,z')." },
+
+ { T_OPT_CP, "SET_X", "set-x|setx",
+ "v1[,v2]",
+ "Define 2 values and sort them to define the minimum"
+ " and maximum x-coordinates of the minimap."
+ " If 'v2' is not entered, '-v1' is used as second value." },
+
+ { T_OPT_CP, "SET_Y", "set-y|sety",
+ "v1[,v2]",
+ "Define 2 values and sort them to define the minimum"
+ " and maximum y-coordinates of the minimap."
+ " If 'v2' is not entered, '-v1' is used as second value." },
+
+ { T_OPT_CP, "SET_Z", "set-z|setz",
+ "v1[,v2]",
+ "Define 2 values and sort them to define the minimum"
+ " and maximum z-coordinates of the minimap."
+ " If 'v2' is not entered, '-v1' is used as second value." },
+
+ { T_OPT_C, "XCENTER", "xcenter",
+ 0,
+ "Center the minimap in x-direction."
+ " This is done after AUTO and SET, but before SCALE and SHIFT." },
+
+ { T_OPT_C, "YCENTER", "ycenter",
+ 0,
+ "Center the minimap in y-direction."
+ " This is done after AUTO and SET, but before SCALE and SHIFT." },
+
+ { T_OPT_C, "ZCENTER", "zcenter",
+ 0,
+ "Center the minimap in z-direction."
+ " This is done after AUTO and SET, but before SCALE and SHIFT." },
+
+ { T_OPT_C, "CENTER", "center",
+ 0,
+ "Center the minimap in all 3 directions."
+ " This is a short cut for {--xcenter --ycenter --zcenter}." },
+
+ { T_OPT_CP, "SCALE", "scale",
+ "vector[@origin]",
+ "Transform the data:"
+ " Scale all coordinates and size values by 'vector'"
+ " relative to the point 'origin'."
+ " If the origin is not set, @0,0,0@ is used instead."
+ "\n "
+ " Negative values mirror the coordinates."
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z')."
+ "\n "
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, ROTATE, TRANSLATE." },
+
+ { T_OPT_CP, "SHIFT", "shift",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates."
+ " It's simlar to {--translate}, but the addition is done before rotation."
+ " The parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z')."
+ "\n "
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, ROTATE, TRANSLATE." },
+
+ { T_OPT_CP, "XSS", "xss",
+ "x1old,x1new,x2old,x2new",
+ "--xss (x-scale-shift) calculates the X values of {--scale} and {--shift},"
+ " so that old values are transformed to the new values."
+ " The parameters are numbers or expression." },
+
+ { T_OPT_CP, "YSS", "yss",
+ "y1old,y1new,y2old,y2new",
+ "--yss (y-scale-shift) calculates the Y values of {--scale} and {--shift},"
+ " so that old values are transformed to the new values."
+ " The parameters are numbers or expression." },
+
+ { T_OPT_CP, "ZSS", "zss",
+ "z1old,z1new,z2old,z2new",
+ "--zss (z-scale-shift) calculates the Z values of {--scale} and {--shift},"
+ " so that old values are transformed to the new values."
+ " The parameters are numbers or expression." },
+
+ { T_OPT_CP, "ROT", "rot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values"
+ " by the angle 'degree' (is a vector) around the 3 axes."
+ " All 3 axes goes through the point 'origin'."
+ " If the origin is not set, @0,0,0@ is used instead."
+ "\n "
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y,z')."
+ "\n "
+ " Option --rot is an alternative for {--xrot}, {--yrot} and {--zrot}"
+ " to define all 3 rotations in one step."
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE." },
+
+ { T_OPT_CP, "XROT", "xrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values"
+ " by the angle 'degree' around the x-axis, that goes through the"
+ " point 'origin'. If the origin is not set, @0,0,0@ is used instead."
+ "\n "
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('y,z' or 'x,y,z')."
+ "\n "
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE." },
+
+ { T_OPT_CP, "YROT", "yrot|hrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values"
+ " by the angle 'degree' around the x-axis, that goes through the"
+ " point 'origin'. If the origin is not set, @0,0,0@ is used instead."
+ " This is a horizontal counterclockwise rotation"
+ " and the old option name --hrot can also used."
+ "\n "
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z')."
+ "\n "
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE." },
+
+ { T_OPT_CP, "ZROT", "zrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values"
+ " by the angle 'degree' around the z-axis, that goes through the"
+ " point 'origin'. If the origin is not set, @0,0,0@ is used instead."
+ "\n "
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y' or 'x,y,z')."
+ "\n "
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE." },
+
+ { T_OPT_CP, "YPOS", "ypos",
+ "pos",
+ "This option defines an Y position for KMP:CKPT transformations."
+ " It has only impact to X and Z rotations"
+ " (Options {--xrot} and {--zrot})."
+ " If not set, the mean y of the active rotation origins are used." },
+
+ { T_OPT_CP, "TRANSLATE", "translate|trans",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates."
+ " It's simlar to {--shift}, but the addition is done after rotation."
+ " The parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z')."
+ " @--trans@ is a short cut."
+ "\n "
+ " Transformations are calculated in the order"
+ " SCALE, SHIFT, ROTATE, TRANSLATE." },
+
+ { T_OPT_C, "NULL", "null",
+ 0,
+ "Create a neutral transformation without affecting the coordinates."
+ " The only influence is, that the dependent values (like maximum)"
+ " are re-calculated as if a transformation has taken place." },
+
+ { T_OPT_C, "NEXT", "next",
+ 0,
+ "Close the current transformation step with all scaling, shifting,"
+ " rotation and translation options"
+ " and open a new step with cleared options."
+ " On transformation each step is logical done one by one."
+ " In real, one total transformation matrix is calculated"
+ " and used for fast transformations."
+ "\n "
+ " If option --next is used, the ability for modifying the scale and"
+ " rotation vectors (not the positions) of different KMP sections"
+ " is nearly always lost. A warning is printed if this occurs." },
+
+ { T_OPT_CP, "ASCALE", "ascale",
+ "factor@dir",
+ "Transform the data and do an axis scale:"
+ " Close the current transformation step like {--next} and scale the"
+ " data by @'factor'@ into the direction given by the vector @'dir'@."
+ " Store the resulting matrix as single transformation step"
+ " and open a new one."
+ "\n "
+ " This kind of transformation is EXPERIMENTAL!" },
+
+ { T_OPT_CP, "AROT", "arot",
+ "degree[@pos1]@pos2",
+ "Transform the data and do an axis rotation:"
+ " Close the current transformation step like {--next} and rotate"
+ " the data by @'degree'@ around the axis defined by the 2 points."
+ " If @'pos1'@ is not set, use @0,0,0@ instead."
+ " Store the resulting matrix as single transformation step"
+ " and open a new one."
+ "\n "
+ " This kind of transformation is EXPERIMENTAL!" },
+
+ { T_OPT_CP, "TFORM_SCRIPT", "tform-script|tformscript",
+ "script",
+ "Load the script and execute it by the text parser."
+ "\n"
+ " Then for each coordinate (2D and 3D),"
+ " call the macro @TRANSFORM@ after all other transformations."
+ " Call it without parameters"
+ " and set variable @$$I@ with a zero based index of all vertices,"
+ " variable @$$D@ to the dimension (2 or 3)"
+ " and the variable @$$P@ to the vector of the current vertex."
+ " If the macro returns a vector, it is the new position."
+ "\n "
+ " For each file, macro @BEGIN@ is called at the beginning"
+ " and @END@ after processing all points,"
+ " but only, if the macros are defined."
+ " For @END@, variable @$$I@ is set to the"
+ " number of processed vertices in the current file."
+ "\n "
+ " Before each macro call, the private and local variables are cleared"
+ " and only global parameters are permanent."
+ " The zero based index is cleared for each new source."
+ " The parameters of the macro calls are defined in the local name space." },
+
+ { T_OPT_C, "MINIMAP", "minimap",
+ 0,
+ "Fix the minimap position in the same way as {wszst MINIMAP --auto}."
+ " All other minimap related options are ignored for the minimap processing."
+ "\1 See https://szs.wiimm.de/cmd/wszst/minimap for details." },
+
+ { T_OPT_CP, "RM_GOBJ", "rm-gobj|rmgobj",
+ "objlist",
+ "Remove objects from the KMP section @GOBJ@."
+ " Therefor a comma separated object list with single values"
+ " like @'a'@ or ranges like @'a:b'@ is expected."
+ " @'a'@ and @'b'@ are numbers, object names (prefixed by 'o$$')"
+ " or any other parser expressions." },
+
+ { T_OPT_GO, "BATTLE", "battle",
+ "[=mode]",
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@."
+ " Without value, @ON@ is used."
+ "\n "
+ " If mode is @ON@, assume a battle arena and enable a spüecial battle support."
+ " If mode is @OFF@, disable special battle arena support."
+ " If mode is @AUTO@, analyse the KMP and estimate, if it is a battle areana."
+ " Modes @ON@ and @OFF@ override KMP parameter @BATTLE-MODE@." },
+
+ { T_OPT_GO, "EXPORT_FLAGS", "export-flags|exportflags|exflags",
+ "[=mode]",
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@."
+ " Without value, @ON@ is used."
+ " --exflags is an alternative name for the option."
+ "\n "
+ " If mode is @ON@, this feature is forced:"
+ " On creating a KMP text file, the option @EXPORT-FLAGS@ is always set to 1."
+ " On creating a binary KMP file, the flags are always exported as lowest byte"
+ " of the scale factors or x-rotation."
+ "\n "
+ " If mode is @OFF@, this feature is totally disabled."
+ " If mode is not @AUTO@, KMP parameter @EXPORT-FLAGS@ is overridden." },
+
+ // 2018-08: may be [[obsolete]] in 1 year
+ { T_OPT_GO, "ROUTE_OPTIONS", "route-options|routeoptions|ropt",
+ "[=mode]",
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@."
+ " Without value, @ON@ is used."
+ "\n "
+ " On mode @ON@, the new commands @$$PREV@ and @$$NEXT@ are printed"
+ " for each group of KMP sections ENPT and ITPT."
+ " On mode @AUTO@, the command is only printed,"
+ " if any option is set or if parameter @SHOW-OPTIONS@ is >0."
+ " On mode @OFF@, this feature is totally disabled to create KMP text files"
+ " that are compatible with versions <1.60a."
+ "\n "
+ " This option exists only for a transition period."
+ " Its behaviour will be changed in the future."
+ " @--ropt@ is a short cut."
+ },
+
+ { T_OPT_GO, "WIM0", "wim0",
+ "[=mode]",
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@."
+ " Without value, @ON@ is used."
+ "\n "
+ " If mode is @ON@, a KMP section called WIM0 is added on binary KMP creation."
+ " The sections contains information for Wiimms tools."
+ "\n "
+ " If mode is @OFF@, this feature is totally disabled."
+ " If mode is not @AUTO@, KMP parameter @KMP-WIM0@ is overridden." },
+
+ { T_OPT_CP, "SLOT", "slot",
+ "keyword",
+ "Patch a track file to run at the specified slot."
+ " KMP and KCL may be modified."
+ " BRRES files may be added to or removed from SZS."
+ " The main keywords are @DAISY, DESERT, SHERBET, SHYGUY,"
+ " STANDARD@ and @MOST@."
+ " Slot numbers (except '42' and '4.2')"
+ " and different other track names are also accepted."
+ " For some conversions, the auto-add library is needed."
+ "\1 See https://szs.wiimm.de/opt/slot for details." },
+
+ { T_OPT_GP, "LOAD_KCL", "load-kcl|loadkcl",
+ "file",
+ "Load a KCL or OBJ file for reference issues." },
+
+ { T_OPT_GP, "KCL", "kcl",
+ "list",
+ "Set global options for KCL processing."
+ " Parameter @'list'@ is a comma separated list of keywords."
+ " A minus sign before a keyword disables a setting."
+ " Each occurrence of the option will only change entered settings"
+ " and all other settings are untouched."
+ "\n "
+ " Keyword @DEFAULT@ resets the default settings"
+ " and @CLEAR@ disables all."
+ " Keywords @SMALL, MEDIUM@ and @CHARY@ select"
+ " the default parameters for the octree creation."
+ " The other allowed keywords are:"
+ " @FAST, NEW, CENTER, ROUND, NORMALS, MTL,"
+ " WIIMM, TRIANGLES, OUT-SWAP, G, USEMTL, CLIP, IN-SWAP, AUTO, HEX4,"
+ " HEX23, HEX, DROP-UNUSED, DROP-FIXED, DROP-INVALID, DROP,"
+ " RM-FACEDOWN, RM-FACEUP, FIX-ALL,"
+ " CONV-FACEUP, WEAK-WALLS, SORT, INPLACE, SILENT@ and @LOG@."
+ "\1 See https://szs.wiimm.de/opt/kcl for details." },
+
+ { T_OPT_CP, "KCL_FLAG", "kcl-flag|kclflag",
+ "joblist",
+ "Modify the KCL flag of KCL files."
+ " A comma separated job list in the format @'srclist=dest'@"
+ " is expected. @'srclist'@ is a plus sign separated list"
+ " with single values like @<val>@, @T<type>@ and @<val>/<mask>@"
+ " or ranges like @<val>:<val>@, @T<type>:<type>@"
+ " and @<val>:<val>/<mask>@."
+ " @'<val>'@ is a complete KCL flag in the range of @0..0xffff@."
+ " @'<type>'@ are only the base types in the range of @0..0x1f@."
+ " If @<mask>@ is present, it marks the relevant bits."
+ " For the @T<type>@ variant, the mask is set to @0x1f@."
+ "\n "
+ " All KCL flags of the source list are assigned to the new value @'dest'@,"
+ " but only the set bits of @'<mask>'@ are modified."
+ " A later definition overrides the previous one."
+ "\1 See https://szs.wiimm.de/opt/kcl-flag for details." },
+
+ { T_OPT_CP, "KCL_SCRIPT", "kcl-script|kclscript",
+ "script",
+ "After reading a KCL source file and executing all transformations,"
+ " the text file @'script'@ is executed by the internal text parser."
+ " The script should use the parser functions @tri$$*()@"
+ " to read and modify the triangle positions and flags,"
+ " or to add or remove complete triangles."
+ "\n "
+ " If this option is used multiple times,"
+ " each script is executed in the entered order."
+ "\1 See https://szs.wiimm.de/opt/kcl-script for details." },
+
+ { T_OPT_GP, "TRI_AREA", "tri-area|triarea",
+ "EXPR",
+ "Define the minimal area size of KCL triangles."
+ " The intention is to ignore triangles that are generally to small."
+ " @EXPR@ is a floating point number or expression."
+ " Triangles are invalidated if their area size is smaller than @EXPR@."
+ " The test is executed after reading files, after transformations,"
+ " and after calculating normals and lengths."
+ " Values between 0.01 and 4.0 are recommended."
+ " The careful value 1.0 is used as default."
+ " Value 0 disables this filter functionality." },
+
+ { T_OPT_GP, "TRI_HEIGHT", "tri-height|triheight|tri-ht|triht",
+ "EXPR",
+ "Define the minimal height of KCL triangles."
+ " The intention is to ignore deformed triangles (very slim, but long)."
+ " @EXPR@ is a floating point number or expression."
+ " Triangles are invalidated if at least 1 of the 3 heights"
+ " is smaller than @EXPR@."
+ " The test is executed after reading files, after transformations,"
+ " and after calculating normals and lengths."
+ " Values between 0.01 and 2.0 are recommended."
+ " The careful value 1.0 is used as default."
+ " Value 0 disables this filter functionality."
+ "\n "
+ " --tri-ht is an alternative name for the option." },
+
+ { T_OPT_CP, "FLAG_FILE", "flag-file|flagfile",
+ "filename",
+ "Define a flag file if scanning an OBJ file (KCL processing)."
+ " The file name may contain %-escapes."
+ " Set it to an empty string to disable flag files at all."
+ "\n "
+ " The tool search the flag file in the following order until found:"
+ " File defined by --flag-file;"
+ " OBJ file name with replaced extension ('a.obj' becomes 'a.flag');"
+ " OBJ file name with appended extension ('a.obj' becomes 'a.obj.flag')."
+ "\1 See https://szs.wiimm.de/opt/flag-file for details." },
+
+ { H_OPT_GO, "XTRIDATA", "xtridata|xtri",
+ "[=level]",
+ "Enable extended KCL triangles tests. The default level is 1." },
+
+ { T_OPT_GP, "KMP", "kmp",
+ "list",
+ "Set global options for KMP processing."
+ " Parameter @'list'@ is a comma separated list of keywords."
+ " A minus sign before a keyword disables a setting."
+ " Each occurrence of the option will only change entered settings"
+ " and all other settings are untouched."
+ "\n "
+ " Keyword @DEFAULT@ resets the default settings"
+ " and @CLEAR@ disables all."
+ " The other allowed keywords are:"
+ " @FORCE, NEW, RM-SPCITEM, LEFT, RIGHT, WIDE, NARROW,"
+ " FIX-CKPH, FIX-ENPH, FIX-ITPH, FIX-PH,"
+ " FIX-CKNEXT, FIX-CKJGPT, FIX-CK, FIX-ALL,"
+ " MASK-PFLAGS, RM-LECODE, PURGE-GOBJ, FULL-DEFOBJ,"
+ " DUMP-CLASS, DUMP-ONEWAY, DUMP-ALL,"
+ " 1LAP ... 9LAPS, MAX-LAPS, RM-EMPTY,"
+ " INPLACE, SILENT@ and @LOG@."
+ "\1 See https://szs.wiimm.de/opt/kmp for details." },
+
+ { T_OPT_GP, "SPEED_MOD", "speed-mod|speedmod",
+ "factor",
+ "The speed modifier is a user extensions to change the basic speed"
+ " of all vehicles. The speed factor itself is stored into"
+ " KMP:STGI section of a track."
+ "\n "
+ " If --speed-mod is set to a value >0.0, then the last 2 bytes "
+ " of the STGI section are patched. The value 0.0 reset"
+ " these 2 bytes and deactivates the speed modifier." },
+
+ { T_OPT_GP, "KTPT2", "ktpt2",
+ "vector",
+ "Insert or replace a second KTPT. Use VECTOR as new position."
+ " VECTOR is either @X,Z@ or @X,Y,Z@ or an expression."
+ " Set Y to 0 for an automatic defined height."
+ "\n "
+ " If the first 4 characters of VECTOR are 'AUTO' (ignoring case),"
+ " then the position is calculated automatically"
+ " and set to the recommendation of command @wkmpt KTPT@."
+ "\n "
+ " The tool looks for the nearest lap counter (CKPT with mode 0)"
+ " and adjust the KTPT: The direction of the lap counter"
+ " is copied and the KTPT is moved to the lap counter line"
+ " using the new direction."
+ "\n "
+ " LE-CODE uses the second KTPT to draw the finish line"
+ " at another place away from the start position." },
+
+ { T_OPT_GP, "TFORM_KMP", "tform-kmp|tformkmp|tkmp",
+ "list",
+ "Select KMP sections and objects for a transformation."
+ " @--tkmp@ is a short cut."
+ " The option expects a comma separated list of keywords."
+ " Non ambiguous of keywords are allowed and minus signs within"
+ " keywords are optional (e.g. @GOBJS@)."
+ " A minus sign before a keyword disables transformation of"
+ " the related section or object."
+ "\n "
+ " Sections are selected by the KMP section names"
+ " @AREA, CAME, CKPT, CNPT, ENPT, GOBJ, ITPT, JGPT,"
+ " KTPT, MSPT@ and @POTI@."
+ "\n "
+ " Objects are selected by the keywords"
+ " @AREA-POSITION, AREA-ROTATE, AREA-SCALE, CAME-POSITION, CKPT-POSITION,"
+ " CNPT-POSITION, CNPT-ROTATE, ENPT-POSITION, ENPT-SCALE,"
+ " GOBJ-POSITION, GOBJ-ROTATE, GOBJ-SCALE, ITPT-POSITION, ITPT-SCALE,"
+ " JGPT-POSITION, JGPT-ROTATE, KTPT-POSITION, KTPT-ROTATE,"
+ " MSPT-POSITION, MSPT-ROTATE@ and @POTI-POSITION@."
+ "\n "
+ " The keywords @NONE@ and @ALL@ (default) complete the field." },
+
+ { T_OPT_CP, "REPAIR_XPF", "repair-xpflags|repairxpflags|repxpf",
+ "file",
+ "Load a KMP file and use it to repair the settings of the extended"
+ " presence flags, if they are destroyed by another KMP tool."
+ " @--repxpf@ is a short cut for this option." },
+
+ { T_OPT_CP, "GAMEMODES", "gamemodes|gmodes",
+ "list",
+ "Filter the list of combinations."
+ " The parameter is a comma separated list of keywords:"
+ " @AUTO@: Add a automatic mode without conditions first."
+ " @STANDARD@ (or @STD@): Add standard modes."
+ " @1STANDARD@ (or @1STD@): Add standard modes first."
+ " @BALLOON@: Add balloon battle modes."
+ " @COIN@: Add coin runners modes."
+ " @BATTLE@: Short cut for 'BALLOON,COIN'."
+ " @VERSUS@ (or @VS@): Add versus modes."
+ " @ITEMRAIN@: Add itemrain modes."
+ " @RACE@: Short cut for 'VERSUS,ITEMRAIN'."
+ " @ALL@ (default): Short cut for 'STANDARD,BATTLE,RACE'."
+ " @NO-MODES@: Exclude 'ALL' and create auto modes only."
+ " @ENGINE@: Include engine classes (default)."
+ " @NO-ENGINE@: Exclude engine classes."
+ " @RANDOM@: Include random modes (default)."
+ " @NO-RANDOM@: Exclude random modes."
+ " @OFFLINE@: Filter offline modes."
+ " @ONLINE@: Filter online modes."
+ " @NO-TT@: Exclude time trial."
+ " @TT@: Force a time trial scenario, even if it is a duplicate."
+ " @FULL@: Don't eliminate duplicates from list (up to "
+ MAX_GAMEMODES " modes)."
+ " @NSORT@: Sort the list by name."
+ " @ISORT@: Sort the list by index."
+ " @DEBUG@: Print a debug info about this option."
+ },
+
+ { T_OPT_GP, "MDL", "mdl",
+ "list",
+ "Set global options for MDL processing."
+ " To enable MDL patching, use option {--patch-file}"
+ " and select BRRES files for patching."
+ "\n "
+ " Parameter @'list'@ is a comma separated list of keywords."
+ " A minus sign before a keyword disables a setting."
+ " Each occurrence of the option will only change entered settings"
+ " and all other settings are untouched."
+ "\n "
+ " A MDL transformation (controlled by the transformation options)"
+ " is only done, if at least one of the keywords"
+ " @VECTOR@ or @VERTEX@ is set."
+ "\n "
+ " Keyword @DEFAULT@ resets the default settings (@VERTEX@)"
+ " and @CLEAR@ disables all."
+ " The other allowed keywords are: @VECTOR, MATRIX,"
+ " VERTEX, PARENT, CHILD@ and @LOG@."
+ "\1 See https://szs.wiimm.de/opt/mdl for details." },
+
+ { T_OPT_GP, "PAT", "pat",
+ "list",
+ "Set global options for PAT processing."
+ " Parameter @'list'@ is a comma separated list of keywords."
+ " A minus sign before a keyword disables a setting."
+ " Each occurrence of the option will only change entered settings"
+ " and all other settings are untouched."
+ "\n "
+ " Keyword @DEFAULT@ resets the default settings"
+ " and @CLEAR@ disables all."
+ " The other allowed keywords are:"
+ " @AUTO, SIMPLE, COMPLEX, BOTH, SILENT@ and @LOG@."
+ "\1 See https://szs.wiimm.de/opt/pat for details." },
+
+ { T_OPT_GP, "PATCH_FILE", "patch-file|patchfile|pfile",
+ "list",
+ "Define, which kind of KMP, KCL and BRRES/MDL files are objects"
+ " for patching. @--pfile@ is a short cut."
+ "\n "
+ " Parameter @'list'@ is a comma separated list of keywords."
+ " A minus sign before a keyword disables a setting."
+ " Each occurrence of the option will only change entered settings"
+ " and all other settings are untouched."
+ "\n "
+ " Keyword @DEFAULT@ resets the default settings (@TRACK,LOG@)"
+ " and @CLEAR@ disables all."
+ " The other allowed keywords are:"
+ " @KMP, KCL, OTHER-KCL, ALL-KCL, MODEL, MAP, VRCORN,"
+ " OTHER-BRRES, ALL-BRRES, TRACK (=KMP,KCL,MODEL,MAP,VRCORN),"
+ " ALL, LOG@ and @LOG-ALL@."
+ "\1 See https://szs.wiimm.de/opt/patch for details." },
+
+ { T_OPT_GP, "KMG_LIMIT", "kmg-limit|kmglimit",
+ "seconds",
+ "Limit the run time for Ballon Battle and Coin Runners"
+ " to the given time in SECONDS. Smaller values are not changed."
+ " The limitation is carried out after loading a binary file"
+ " and before scanning a text file."
+ " Value 0 disables this option." },
+
+ { T_OPT_GP, "KMG_COPY", "kmg-copy|kmgcopy",
+ "id",
+ "Make all 10 slots of a KMG file equal after loading a binary file"
+ " and before scanning a text file."
+ " ID is either a slot index (0..9) or a slot name (A11..A25)"
+ " and declares the source slot. Value -1 disables this option."
+ " If ID contains brackets [...], then it is analysed as an arena name and"
+ " the part between the brackets is searched for attributes A11..A25." },
+
+// { H_OPT_GP, "KMG_AUTO_COPY","kmg-auto-copy|kmgautocopy",
+// 0,
+// "Analyze the attributes of the source file name to find attributes"
+// " from @a21@ to @a25@. If found, use is as slot name ..." },
+
+ { T_OPT_G, "LT_CLEAR", "lt-clear|ltclear",
+ 0,
+ "Clear the LEX/TEST section and remove the section and course.lex if empty."
+ " This option is executed before all other --lt-* options." },
+
+ { T_OPT_GP, "LT_ONLINE", "lt-online|ltonline",
+ "mode",
+ "Set LEX/TEST parameter OFFLINE-ONLINE to this MODE."
+ " MODE is one of @AUTO@ (default), @NEVER@ or @ALWAYS@."
+ " Only track.szs files are modified."
+ " If needed, file course.lex and section TEST"
+ " are created or removed if empty." },
+
+ { T_OPT_GP, "LT_N_PLAYERS", "lt-n-players|lt-nplayers|ltnplayers",
+ "offline,online",
+ "Set LEX/TEST parameters N-OFFLINE and N-ONLINE to these integer values."
+ " Only track.szs files are modified."
+ " If needed, file course.lex and section TEST"
+ " are created or removed if empty." },
+
+ { T_OPT_GP, "LT_COND_BIT", "lt-cond-bit|lt-condbit|ltcondbit",
+ "bitnum",
+ "Set LEX/TEST parameter COND-BIT to this integer value."
+ " Use -1 to deactivate this COND-BIT."
+ " Only track.szs files are modified."
+ " If needed, file course.lex and section TEST"
+ " are created or removed if empty." },
+
+ { T_OPT_GP, "LT_GAME_MODE", "lt-game-mode|lt-gamemode|ltgamemode",
+ "mode",
+ "Set LEX/TEST parameter GAME-MODE to this MODE."
+ " MODE is one of @AUTO@ (default), @BALLOON, COIN, VERSUS@ or @ITEMRAIN@."
+ " Only track.szs files are modified."
+ " If needed, file course.lex and section TEST"
+ " are created or removed if empty." },
+
+ { T_OPT_GP, "LT_ENGINE", "lt-engine|ltengine",
+ "mode",
+ "Set LEX/TEST parameter ENGINE to this MODE."
+ " MODE is one of @AUTO@ (default), @BATTLE, 50CC, 100CC, 150CC, 200CC,"
+ " 150M@ or @200M@. Only track.szs files are modified."
+ " If needed, file course.lex and section TEST"
+ " are created or removed if empty." },
+
+ { T_OPT_GP, "LT_RANDOM", "lt-random|ltrandom",
+ "index",
+ "Force a random scenario, if between 1 and 8."
+ " Value 0 enables auto selection and -1 disables this option."
+ " Only track.szs files are modified."
+ " If needed, file course.lex and section TEST"
+ " are created or removed if empty." },
+
+ { T_OPT_G, "LEX_PURGE", "lex-purge|lexpurge",
+ 0,
+ "Delete LEX sections without any impact."
+ " Delete sub-file course.lex if it no longer contains a section."
+ " This option is executed after all --lt-* options." },
+
+ { T_OPT_CMP, "LOAD_BMG", "load-bmg|loadbmg",
+ "file",
+ "Load immediately the file to fill an internal message pool."
+ " The option can be used multiple times"
+ " to fill the message pool by different sources."
+ " A later message overrides the previous message."
+ "\n "
+ " The internal message pool is patched by all"
+ " {--patch-bmg} options." },
+
+ { T_OPT_CMP, "PATCH_BMG", "patch-bmg|patchbmg|pb",
+ "mode[cond][=param]",
+ PATCH_BMG_TEXT("") },
+
+ { T_OPT_CMP, "MACRO_BMG", "macro-bmg|macrobmg|mb",
+ "file",
+ "Load a BMG file and add the messages to the macro library;"
+ " already existing entries are replaced."
+ " The macro library is accessed by escape sequence @\\m{{MID}@"
+ " as fallback, if the active file has not already defined the"
+ " message @MID@ by itself." },
+
+ { T_OPT_CMP, "FILTER_BMG", "filter-bmg|filterbmg|fb|msg",
+ "list",
+ "If this option is set, the BMG messages are filtered by this list."
+ " Only enabled messages are exported to the output BMG file"
+ " (binary or text)."
+ "\n "
+ " The parameter is a list of message ids"
+ " (short MID, 'Txx' or 'Uxx' or Mxx' or hex number)"
+ " or message ranges (MID:MID) or one of the keywords"
+ " @NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT,"
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS,"
+ " LECODE (=LE), LEUPS, LETRACKS, LEARENAS, LEREFS,"
+ " XCODE (=X), XUPS, XTRACKS, XARENAS, XREFS,"
+ " ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS,"
+ " GENERIC@ or @ALL@."
+ " If an element is preceded by a minus sign, "
+ " it is removed from the filter list (disabled)."
+ "\n "
+ " With v2.01a, this option was renamed from --msg to the more"
+ " meaningful name --filter-bmg. The old name is still available."
+ "\1\n Read https://szs.wiimm.de/opt/filter-bmg for more details." },
+
+ { T_OPT_GP, "CACHE", "cache",
+ "dir",
+ "Define a directory for a SZS cache."
+ "If creating a YAZ0 compressed file with standard compression (level 9),"
+ " the cache is searched for the compressed version."
+ " File cache-content.txt is used as file list with hash values."
+ " If the cache file is not found or the content differ,"
+ " the file is (re-)created and exit status 2=differ is returned."
+ "\n "
+ " Background: Loading a compressed SZS and content verification"
+ " is much faster than YAZ compression."
+ "\n "
+ " For legay reasons:"
+ " If parameter DIR is a file, it is split into directory and base name."
+ " The directory is used for the cache directory and the base name"
+ " for option {--cname}, but only if {--cname} is not used." },
+
+ { T_OPT_GP, "CNAME", "cname",
+ "name",
+ "Name of the first cache file."
+ " This parameter overrides the generated cache name."
+ " The name is used only once for the very first cache candidate." },
+
+ { T_OPT_C, "ID", "id",
+ 0,
+ "Print an ID with 8 characters instead of a SHA-1 sum with"
+ " 40 characters. The SHA-1 sum is used to calculate the ID."
+ " The ID consists of '0'-'9' and 'a'-'w' (32 characters)." },
+
+ { T_OPT_CO, "BASE64", "base64",
+ "[=mode]",
+ "Encode the the checksum string as BASE64 with 27 characters"
+ " instead of hex."
+ " If a parameter is set, it acts like {--coding=mode}." },
+
+ { T_OPT_CO, "DB64", "db64",
+ "[=mode]",
+ "Encode the the checksum string and some length as BASE64"
+ " with 32 characters instead of hex for database searches."
+ " This options implies {--coding=URL} if no other coding is defined."
+ " If a parameter is set, it acts like {--coding=mode}."
+ " Option {--db64} has priority over {--base64}." },
+
+ { T_OPT_CP, "CODING", "coding",
+ "mode",
+ "Define the coding of the non alphanumeric characters for BASE64:"
+ " STANDART (+/=, default), URL (-_=), STAR (-_*) or XML (.-*)." },
+
+ { T_OPT_C, "VERIFY", "verify",
+ 0,
+ "Calculate the checksum and compare the filename and return"
+ " exit status (0=valid, 2=differ)."
+ " The result is valid, if the checksum is found"
+ " with a leading and a following point or minus sign."
+ " If {--quiet} is set, error messages are suppressed." },
+
+ { T_OPT_C, "ROUND", "round",
+ 0,
+ "Print additional lines with rounded values"
+ " (to 3 and 2 bytes for floats and 7 and 6 bytes for doubles)."},
+
+ { T_OPT_CM, "LONG", "l|long",
+ 0, "Print in long format. Multiple usage possible." },
+
+// { T_OPT_CM, "FULL", "full",
+// 0,
+// "Print full lists instead of partial lists." },
+
+ { T_OPT_C, "NO_HEADER", "H|no-header|noheader",
+ 0,
+ "Suppress printing of header and footer." },
+
+ { T_OPT_C, "BRIEF", "B|brief",
+ 0,
+ "Suppress information lines in decoded text files."
+ " This includes syntax information ({--no-header})."
+ " If set twice, the output of unneeded sections is also suppressed." },
+
+ { T_OPT_CM, "PIPE", "pipe",
+ 0, "Use pipe sign instead of spaces to separate columns." },
+
+ { T_OPT_C, "DELTA", "delta",
+ 0,
+ "Print only modified records or sections on text output."
+ " Supported file formats until now: @GEOHIT@, @ITEMSLOT@, @KMG@"
+ " and @OBJFLOW@."
+ " If set twice, limit output to modified records"
+ " (only relevant for @ITEMSLOT@)." },
+
+ { T_OPT_C, "DIFF", "diff",
+ 0,
+ "On text output, print only differences from original files."
+ " It's a short cut for --no-header --brief --brief --delta --delta."
+ " Additional, the output is limited to data sections." },
+
+ { H_OPT_CP, "EPSILON", "epsilon",
+ "float",
+ "When comparing floating point numbers, 2 numbers are considered identical"
+ " if their difference is less than or equal to epsilon."
+ " The default value is @" CONVERT_TO_STRING(DEF_EPSILON_POS) "@." },
+
+ { T_OPT_CP, "BMG_ENCODING", "bmg-encoding|bmgencoding",
+ "name",
+ "Force a BMG encoding for new BMG files."
+ " Accepted encoding names are: @CP-1252@, @UTF-16BE@ (or @UTF-16@),"
+ " @SHIFT-JIS@, @UTF-8@ and @AUTO@ for automatic detection (default)."
+ " Same keywords without minus signs are accepted too."
+ "\n "
+ " Mario Kart Wii uses encoding @UTF-16BE@;"
+ " the default if no other encoding is defined." },
+
+ { T_OPT_CP, "BMG_INF_SIZE", "bmg-inf-size|bmginfsize",
+ "size",
+ "Defines the 'INF1' size of new BMG files between 4 and "
+ UI_TO_TEXT(BMG_INF_LIMIT) "."
+ " The first 4 bytes of a INF1 record is an offset into the"
+ " string pool and the remaining bytes the attributes."
+ " Maximal " UI_TO_TEXT(BMG_ATTRIB_SIZE)
+ " attribute bytes are supported and additional bytes are"
+ " assumed to be NULL. All BMG files of MKW have a size of 8." },
+
+ { T_OPT_CO, "BMG_MID", "bmg-mid|bmgmid",
+ "[mode]",
+ "Control the creation of BMG section @MID1@."
+ " Suppress the creation, if mode is @OFF@."
+ " Force the creation, if mode is @ON@."
+ " On mode @AUTO@ (default), the source is analysed for the decision." },
+
+ { T_OPT_CP, "FORCE_ATTRIB", "force-attrib|forceattrib",
+ "attrib",
+ "Forces, that all attributes are set to this vector."
+ "\1 See https://szs.wiimm.de/doc/bmg/attrib for the syntax." },
+
+ { T_OPT_CP, "DEF_ATTRIB", "def-attrib|defattrib",
+ "attrib",
+ "Define the default attributes for BMG files."
+ " If not set, the default attributes are estimated."
+ " On text output, strings with default attributes are printed"
+ " without attribute vector."
+ " The usual default attribute for MKW is @[1]@."
+ "\1 See https://szs.wiimm.de/doc/bmg/attrib for the syntax." },
+
+ { T_OPT_C, "NO_ATTRIB", "no-attrib|noattrib",
+ 0,
+ "Suppress the output of any BMG attributes if creating BMG text files." },
+
+ { T_OPT_C, "X_ESCAPES", "x-escapes|xescapes",
+ 0,
+ "Use \\x{{} escapes instead of \\z{{} escapes." },
+
+ { T_OPT_C, "OLD_ESCAPES", "old-escapes|oldescapes",
+ 0,
+ "To be compatible with v1.43 and earlier,"
+ " print 1A escape sequences with total size of >12 bytes"
+ " as single words using \\x{{}."
+ " Also don't use \\x{{} and \\u{{} with parameter lists." },
+
+ { T_OPT_C, "SINGLE_LINE", "1|single-line|singleline",
+ 0,
+ "If set, don't print continuation lines for BMG text output."
+ " If set twice, print only single text lines and suppress attributes"
+ " like option {--no-attrib} does it." },
+
+ { T_OPT_C, "NO_BMG_COLORS","no-bmg-colors|nobmgcolors",
+ 0,
+ "If set, suppress the output of '\\c{{color}'"
+ " escape sequences for colors definitions in BMG text output"
+ " to be compatible with old versions of the tools." },
+
+ { T_OPT_C, "BMG_COLORS", "bmg-colors|bmgcolors",
+ 0,
+ "Force output of '\\c{{color}' escape sequences with names,"
+ " even for foreign (not MKWii) BMG files." },
+
+ { T_OPT_C, "NO_BMG_INLINE","no-bmg-inline|nobmginline",
+ 0,
+ "Print BMG attributes as separate line before the message definition"
+ " to be compatible with versions until v1.39."
+ " The output for the standard value 0x01000000 is always suppressed."
+ " This was the default until v1.43." },
+
+ { T_OPT_C, "EXPORT", "X|export",
+ 0,
+ "Enable the export mode and create small and machine readable"
+ " text files for easy post processing."
+ " The option works similar like @-HBB@ for KMP"
+ " and like @-HBl1@ for BMG text files." },
+
+ { T_OPT_C, "NO_PARAM", "P|no-param|noparam",
+ 0,
+ "Disable parameter support in decoded KMP text files." },
+
+ { T_OPT_CP, "SORT", "S|sort",
+ "mode",
+ "Define a sort mode. Allowed keywords are:"
+ " @NONE@ (default), @NAME, OFFSET, U8, PACK, BRRES, BREFT@ and @AUTO@" },
+
+ { T_OPT_GP, "MAX_FILE_SIZE","M|max-file-size|maxfilesize",
+ "size",
+ "This security option defines the maximum file size"
+ " for input files; larger files are ignored with a warning."
+ " The default unit is MiB and the default size is 100 MiB;"
+ " that should be enough for standard usage." },
+
+ { T_OPT_GP, "TRACKS", "T|tracks",
+ "tracks",
+ "Define a new track order."
+ " A comma separated list in the format @[a=]b@ or @a:=b@ is expected."
+ " @'a'@ and @'b'@ are track names or slot numbers."
+ " @'a'@ is the destination slot and @'b'@ the assigned track."
+ " If @'a'@ is omitted, the next slot is used;"
+ " this means @[a=]b,c,d@ is possible."
+ "\n "
+ " Tracks will only be exchanged so that always all tracks are assigned."
+ " But if using @':='@ the new slots are assigned without exchanging"
+ " and the old values are lost." },
+
+ { T_OPT_GP, "ARENAS", "A|arenas",
+ "arenas",
+ "Define a new arena order."
+ " A comma separated list in the format @[a=]b@ or @a:=b@ is expected."
+ " @'a'@ and @'b'@ are arena names or slot numbers."
+ " @'a'@ is the destination slot and @'b'@ the assigned arena."
+ " If @'a'@ is omitted, the next slot is used;"
+ " this means @[a=]b,c,d@ is possible."
+ "\n "
+ " Arenas will only be exchanged so that always all arenas are assigned."
+ " But if using @':='@ the new slots are assigned without exchanging"
+ " and the old values are lost." },
+
+ { T_OPT_GP, "AUTOADD_PATH", "autoadd-path|autoaddpath",
+ "directory",
+ "Define an alternative directory as autoadd library."
+ " The default is, that the sub-directory called './auto-add/'"
+ " of all search paths are used."
+ " Use {wszst test -vvvv} for tests." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "TRANSFORM", "x|transform",
+ "list",
+ "Convert image formats."
+ " A comma separated list with terms is expected."
+ " A term have the syntax @'[SRC=]DEST'@."
+ " It means: convert @SRC@ format into @DEST@ format."
+ " If @SRC=@ is not set, the destination format is used"
+ " 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 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@ (import)."
+ " Allowed image formats are: @I4, I8, IA4, IA8, RGB565 (=R565),"
+ " RGB5A3 (=R3), RGBA32 (=R32), C4, C8, C14X2, CMPR@."
+ " Allowed palette formats are: @P-IA8 (=P8), P-RGB565 (=P565),"
+ " P-RGB5A3 (=P3)@."
+ " Attributtes are @PALETTE@, @NO-PALETTE@, @GRAY@, @COLOR@,"
+ " @ALPHA@ and @NO-ALPHA@."
+ "\n "
+ " All terms are managed as list."
+ " For each graphic the list is iterated until the first SRC tuple"
+ " of a term matches the graphic."
+ " Then the destination tuple is used for the transformation."
+ "\n "
+ " The command {wimgt TEST} prints a clearly arranged readable table"
+ " as result of this option." },
+
+ { T_OPT_C, "STRIP", "strip",
+ 0,
+ "If creating a PNG file,"
+ " don't add comments about creator and source formats." },
+
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_G, "UTF_8", "utf-8|utf8",
+ 0,
+ "Enables UTF-8 support for filenames (default)." },
+
+ { H_OPT_G, "NO_UTF_8", "no-utf-8|no-utf8|noutf8",
+ 0,
+ "Disables UTF-8 support for filenames." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_GM, "TEST", "t|test",
+ 0,
+ "Run in test mode, modify nothing."
+ "\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<" },
+
+ { T_OPT_GM, "FORCE", "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed."
+ "\n"
+ "Option {--kmp force} does the same, but only for KMP files."
+ "\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" },
+
+ { T_OPT_GO, "REPAIR_MAGICS", "repair-magics|repairmagics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files"
+ " and sub-files by analysing file path and file extension."
+ " @MODE@ is one of @OFF@ (default), @ANALYZE@"
+ " or @REPAIR@ (default, if set without mode)."
+ " @OFF@ disables this feature, @ANALYZE@ enables it for analysis only,"
+ " and @REPAIR@ repairs all magics while reading the files."
+ " Keyword @FNAME@ can be appended (separated by a comma)"
+ " to give filename scanning the highest priority."
+ "\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" },
+
+ { T_OPT_GP, "TINY", "tiny",
+ "mode",
+ "Set tiny mode to a level between 0 and 7."
+ "\1 See https://szs.wiimm.de/opt/tiny for details." },
+
+ { T_OPT_G, "YAZ0", "yaz0",
+ 0,
+ "If creating a compressed file, force Yaz0 compression."
+ " Yaz0 compression is the default,"
+ " if no compression method is defined by option or setup file." },
+
+ { T_OPT_G, "YAZ1", "yaz1",
+ 0,
+ "If creating a compressed file, force Yaz1 compression."
+ " The difference to Yaz0 is only the magic,"
+ " which is set to 'Yaz1'." },
+
+ { T_OPT_G, "XYZ", "xyz",
+ 0,
+ "If creating a compressed file,"
+ " force XYZ compression (an experimental Yaz0 variant)." },
+
+ { T_OPT_G, "BZ", "bz",
+ 0,
+ "If creating a compressed file,"
+ " force BZ compression (a BZIP2 variant)." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_G, "SH", "sh",
+ 0,
+ "Dump info using SH syntax."
+ " Use {--var name} as prefix." },
+
+ { T_OPT_G, "BASH", "bash",
+ 0,
+ "Dump info using BASH syntax."
+ " Use {--var name} as prefix." },
+
+ { T_OPT_G, "JSON", "json",
+ 0,
+ "Dump info using JSON syntax."
+ " Options {--var} and {--array} are ignored." },
+
+ { T_OPT_G, "PHP", "php",
+ 0,
+ "Dump infos using PHP syntax."
+ " Use {--var name} as variable name of the resulting object." },
+
+ { T_OPT_G, "MAKEDOC", "makedoc",
+ 0,
+ "Dump infos using MakeDoc syntax."
+ " Use {--var name} as variable name of the resulting map." },
+
+ { T_OPT_GP, "VAR", "var",
+ "varname",
+ "Use @VARNAME@ as variable name or prefix on script output."
+ " The default variabe name is 'res'." },
+
+ { T_OPT_G, "ARRAY", "array",
+ 0,
+ "Use an array on script output if possible."
+ " If arrays are not supported, then append a '_#' suffix with an zero"
+ " based index to the variable name defined by {--var name}."
+ " In this case, only one output file is created." },
+
+ { T_OPT_GP, "AVAR", "avar",
+ "varname",
+ "Shortcut for: {--array --var name}" },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { H_OPT_CP, "ANALYZE", "analyze|analyse",
+ "outfile",
+ "Run in analyze mode and write results to the entered file." },
+
+ { H_OPT_CP, "ANALYZE_MODE", "analyze-mode|ana-mode|anamode|amd",
+ "modelist",
+ "Comma separated list with objects to analyse."
+ " Objects are @BRRES, MDL0, PAT0, TEX0, BREFF, BREFT, TPL,"
+ " KCL, KMP, GOBJ, KTPT, MKWANA@"
+ " and @ALL@ for all (=default)."
+ " @--ana-mode@ is a short cut." },
+
+ #if OPT_OLD_NEW
+ { H_OPT_GM, "OLD", "OLD",
+ 0,
+ "Developer option:"
+ " Cancel --NEW and use old implementation if available." },
+
+ { H_OPT_GM, "STD", "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW"
+ " and use standard implementation (default)." },
+
+ { H_OPT_GM, "NEW", "NEW",
+ 0,
+ "Developer option:"
+ " Cancel --OLD and use new implementation if available." },
+ #endif
+
+ { H_OPT_GP, "EXTRACT", "EXTRACT",
+ "dir",
+ "Create the directory and extract different objects"
+ " in different formats at the moment when they are seen."
+ " This is a development helper option." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "SOURCE", "s|source|src",
+ "path",
+ "Define a secondary source path (directory/file)."
+ "\n "
+ " The path may contain escape sequences:"
+ " @%Q@ is replaced by the fully qualified primary source name."
+ " @%P@ and @%F@ are replaced by the primary source path"
+ " or by the filename. @%N@ and @%E@ are replaced by primary source"
+ " filename without extension or by the source extension."
+ " Finally, @%T@ is replaced by the default extension"
+ " of a virtual destination format."
+ "\n "
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions"
+ " avoid that the same extension is used twice in row."
+ "\1 Read https://szs.wiimm.de/opt/source for more details." },
+
+
+ { T_OPT_CP, "DEST", "d|dest",
+ "path",
+ "Define a destination path (directory/file)."
+ " The destination @-@ means: write to standard output."
+ "\n "
+ " The path may contain escape sequences:"
+ " @%Q@ is replaced by the fully qualified source name."
+ " @%P@ and @%F@ are replaced by the source path or by the filename."
+ " @%N@ and @%E@ are replaced by source filename without extension"
+ " or by the source extension."
+ " Finally, @%T@ is replaced by the default extension"
+ " of the destination format."
+ "\n "
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions"
+ " avoid that the same extension is used twice in row."
+ "\1 Read https://szs.wiimm.de/opt/dest for more details." },
+
+ { T_OPT_CP, "DEST2", "D|DEST",
+ "path",
+ "Like {--dest}, but create the directory path automatically." },
+
+ { T_OPT_CP, "ESC", "E|esc",
+ "char",
+ "Define an alternative escape character for destination files."
+ " The default is '%'."
+ " For Windows batch files it is a good choice to set @'-E$$'@." },
+
+ { T_OPT_C, "OVERWRITE", "o|overwrite",
+ 0,
+ "Overwrite already existing files without warning"
+ " and ignore option {--number}." },
+
+ { T_OPT_C, "NUMBER", "number|num",
+ 0,
+ "If a file already exist, append a number directly before"
+ " the file extension to make the filename unique."
+ " If other numbered files already exist (ignoring case),"
+ " use the maximum existing index+1."
+ " @--num@ is a short cut." },
+
+ { T_OPT_C, "REMOVE_SRC", "remove-src|removesrc|rm-src|rmsrc",
+ 0,
+ "Remove the source file after successful operation."
+ " @--rm-src@ is a short cut." },
+
+ { T_OPT_C, "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove",
+ 0,
+ "Remove already existing files before creating it."
+ " If set, {--overwrite} is ignored."
+ " @--rm-dest@ is a short cut." },
+
+ { T_OPT_C, "UPDATE", "u|update",
+ 0,
+ "Update only existing files and don't create new files."
+ " If set, {--overwrite} and {--remove-dest} are ignored." },
+
+ { T_OPT_C, "PRESERVE", "p|preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files." },
+
+ { T_OPT_C, "IGNORE", "i|ignore",
+ 0,
+ "Ignore non existing source files without warning." },
+
+ { T_OPT_C, "IGNORE_SETUP", "ignore-setup|ignoresetup",
+ 0,
+ "Ignore hidden setup file '@" SZS_SETUP_FILE "@'."
+ " This file is used to determine some default settings and to find"
+ " out sub archives and files to encode."
+ " Use this option only if you know what you do." },
+
+ { T_OPT_C, "PURGE", "purge",
+ 0,
+ "Remove repeated files with same checksum." },
+
+ { T_OPT_CP, "ALIGN_U8", "align-u8|alignu8",
+ "size",
+ "Define an align value for the sub files in U8 archives."
+ " The value must be a power of 2 and the default value is 32 (0x20)"
+ " This value is only relevant if creating or normalizing U8 archives." },
+
+ { T_OPT_CP, "ALIGN_PACK", "align-pack|alignpack",
+ "size",
+ "Define an align value for the sub files in PACK archives."
+ " The value must be a power of 2 and the default value is 32 (0x20)"
+ " This value is only relevant if creating or normalizing OACK archives." },
+
+ { T_OPT_CP, "ALIGN_BRRES", "align-brres|alignbrres",
+ "size",
+ "Define an align value for the sub files in BRRES archives."
+ " The value must be a power of 2 and the default value is 4"
+ " This value is only relevant if creating or normalizing BRRES archives." },
+
+ { T_OPT_CP, "ALIGN_BREFF", "align-breff|alignbreff",
+ "size",
+ "Define an align value for the sub files in BREFF archives."
+ " The value must be a power of 2 and the default value is 4"
+ " This value is only relevant if creating or normalizing BREFF archives." },
+
+ { T_OPT_CP, "ALIGN_BREFT", "align-breft|alignbreft",
+ "size",
+ "Define an align value for the sub files in BREFT archives."
+ " The value must be a power of 2 and the default value is 0x20"
+ " This value is only relevant if creating or normalizing BREFT archives." },
+
+ { T_OPT_CP, "ALIGN", "align",
+ "size",
+ "Define an align value for the sub files in all archives."
+ " This is a short cut for"
+ " {--align-u8=size --align-pack=size"
+ " --align-brres=size --align-breff=size --align-breft=size}." },
+
+ { T_OPT_C, "ENCODE_ALL", "encode-all|encodeall|eall",
+ 0,
+ "Encode all files. Normally a file is only encoded, if the source"
+ " is younger than the destination or the destination is missing."
+ " Only files in the @[encode]@ section of the file '@" SZS_SETUP_FILE "@'"
+ " are candidates for encoding."
+ " @--eall@ is a short cut."
+ " Option {--no-encode} takes precedence over {--encode-all}." },
+
+ { T_OPT_C, "ENCODE_IMG", "encode-img|encodeimg|eimg",
+ 0,
+ "Encode all image files. Normally a image file is only encoded, if the source"
+ " is younger than the destination or the destination is missing."
+ " Only files in the @[encode]@ section of the file '@" SZS_SETUP_FILE "@'"
+ " are candidates for encoding."
+ " @--eimg@ is a short cut."
+ " If set, option {--no-encode} is ignored for images." },
+
+ { T_OPT_C, "NO_ENCODE", "no-encode|noencode|noenc",
+ 0,
+ "Do not encode files before creating an archive."
+ " @--noenc@ is a short cut."
+ " Option {--no-encode} takes precedence over {--encode-all},"
+ " but {--encode-img} takes precedence for images." },
+
+ { T_OPT_C, "NO_RECURSE", "no-recurse|norecurse|norec",
+ 0,
+ "Do not create archives recursively."
+ " Normally files in the @[create]@ section of the file"
+ " '@" SZS_SETUP_FILE "@' are created first."
+ " @--norec@ is a short cut." },
+
+ { T_OPT_C, "AUTO_ADD", "auto-add|autoadd|aadd",
+ 0,
+ "Analyze the KMP (if exist) and add missing BRRES, BREFF, BREFT,"
+ " BRASD and KCL files automatically, if the tool can find the files"
+ " in any sub directory named 'auto-add'."
+ " This sub directory is searched in all directories"
+ " of @'SEARCH_PATH'@; use command @{wszst AUTOADD}@ to view them."
+ " Command {wszst AUTOADD} may also create an auto-add database."
+ " @--aadd@ is a short cut." },
+
+ { T_OPT_C, "NO_ECHO", "no-echo|noecho",
+ 0,
+ "Suppress output of @@ECHO commands while scanning text files." },
+
+ { T_OPT_C, "NO_CHECK", "N|no-check|nocheck",
+ 0,
+ "Do not make plausibility checks for KCL and KMP files." },
+
+ { T_OPT_CO, "PT_DIR", "pt-dir|ptdir|pdir",
+ "[=mode]",
+ "Set one of the `point directory' modes @REMOVE@ (=@0@),"
+ " @FORCE@ (=@1@) or @AUTO@ (default)."
+ " If --pt-dir is used without parameter, then @FORCE@ is assumed."
+ "\n "
+ " This option is only relevant if creating an U8 archive."
+ " It decides, if a special directory with name '.'"
+ " will be added as base for all other files." },
+
+ { T_OPT_C, "RM_AIPARAM", "rm-aiparam|rmaiparam|rmai",
+ 0,
+ "Remove the directory AIParam and all files from the archive."
+ " This option has only impact, if creating a new archive or"
+ " normalizing an existing archive."
+ " @--rmai@ is a short cut." },
+
+ { T_OPT_C, "U8", "u8",
+ 0,
+ "Create an U8 archive, if possible."
+ " If the source is a WU8 archive, convert it to an U8 archive."
+ " This is the default if the setup file '@" SZS_SETUP_FILE "@'"
+ " has no other definition."
+ " The default compression mode is set to Yaz0 (see {--yaz0})." },
+
+ { T_OPT_C, "SZS", "szs",
+ 0,
+ "Short cut for {--u8 --yaz0}:"
+ " Create an U8 archive, if possible,"
+ " and set the compression method to Yaz0." },
+
+ { T_OPT_C, "WU8", "wu8",
+ 0,
+ "Create a WU8 archive, if possible."
+ " If the source is an U8 archive, convert it to a WU8 archive." },
+
+ { H_OPT_C, "XWU8", "xwu8",
+ 0,
+ "Short cut for {--wu8 --xyz}:"
+ " Create a WU8 archive, if possible,"
+ " and set the compression method to XYZ." },
+
+ { T_OPT_C, "WBZ", "wbz",
+ 0,
+ "Short cut for {--wu8 --bz}:"
+ " Create a WU8 archive, if possible,"
+ " and set the compression method to BZ." },
+
+ { T_OPT_C, "PACK", "pack",
+ 0,
+ "Create a PACK archive." },
+
+ { T_OPT_C, "BRRES", "brres|bres",
+ 0,
+ "Create a BRRES archive." },
+
+ { T_OPT_C, "BREFF", "breff",
+ 0,
+ "Create a BREFF archive." },
+
+ { T_OPT_C, "BREFT", "breft",
+ 0,
+ "Create a BREFT archive." },
+
+ { T_OPT_C, "NO_COMPRESS", "no-compress|nocompress|noc",
+ 0,
+ "Create an uncompressed file instead of a compressed SZS file."
+ " The default destination changes to @'%P/%N%T'@."
+ " @--noc@ is a short cut." },
+
+ { T_OPT_CP, "COMPRESS", "C|compr|compress",
+ "level",
+ "Define a compression level between @0..9@:"
+ " @0@ (or @NOCHUNKS@) disables finding chunks,"
+ " @1@ (or @FAST@) for the fastest standard compression and"
+ " @9@ (or @BEST@) for the best (=default) compression."
+ " @10@ (or @ULTRA@) and @100-150@ are special time-consuming"
+ " compression modes."
+ " They are dedicated to competitions with size limitations."
+ " The special value @UNCOMPRESSED@ acts like option {--no-compress}."
+ "\n "
+ " Because of many repeated data, the best bz-compression mode varies."
+ " Therefor the levels @TRY2..TRY5@ (or short @T2..T5@) are defined"
+ " to find the best compression mode with testing the first"
+ " N modes of 9, 1, 8, 2, 5. @TRY2@ is used for normalizing."
+ " For non bz-compression, @TRY*@ are the same as @BEST@."
+ "\n "
+ " Option {--norm} takes precedence over {--compr}"
+ " and sets the compression level to @TRY2@ (@BEST@)."
+ "\n "
+ " For more modes and details type {wszst -C list}."
+ " To force colorized output type {wszst -C clist}." },
+
+ { T_OPT_C, "FAST", "fast",
+ 0,
+ "Short cut for {--compr=fast}: Set the fastest real compression."
+ " It also overrides compression rates set by {--norm} or {--compr}." },
+
+ { T_OPT_C, "NORM", "n|norm",
+ 0,
+ "The uncompressed data will be normalized."
+ " See command {NORMALIZE} for more details." },
+
+ { T_OPT_C, "LINKS", "links",
+ 0,
+ "Support hardlinks while creating U8 and WU8 archives."
+ " Keep hardlinks if normalizing U8 and WU8 archives."
+ " On extracting, search hardlinks in every archive and try"
+ " to create hardlinks at local file system." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_CP, "BASEDIR", "basedir|bdir",
+ "directory",
+ "Extract only files from archives, that are below the DIRECTORY."
+ " Leading points and slashes and trailing slahes are removed"
+ " from the parameter. --bdir is short cut for --basedir." },
+
+ { T_OPT_CO, "RECURSE", "R|recurse",
+ "[=level]",
+ "If a extracted file is a known and supported archive"
+ ", than extract it recursively until the entered level is reached."
+ " Level 0 (=@NONE@) deactivates this."
+ " If --recurse is used without parameter,"
+ " then @UNLIMITED@ is assumed."
+ "\n "
+ " -R does'nt accept a parameter"
+ " and is a short cut for {--recurse=unlimited}." },
+
+ { T_OPT_C, "EXT", "e|ext",
+ 0,
+ "For BRRES archives only:"
+ " If a file is extracted, add a handy file extension like '.mdl'"
+ " to the file name. If set twice and a textual file magic is"
+ " available, use the file magic in lower case instead like '.mdl0'." },
+
+ { T_OPT_C, "DECODE", "decode|dec",
+ 0,
+ "If a extracted file is known and can be decoded, do it."
+ " @--dec@ is a short cut." },
+
+ { T_OPT_C, "MIPMAPS", "mipmaps|mm",
+ 0,
+ "If reading a source, scan for mipmaps and load them too."
+ " For PNG files, files named @NAME.mm#.EXT@ with #=1.. are searched."
+ " This is the default. @--mm@ is a short cut." },
+
+ { T_OPT_C, "NO_MIPMAPS", "no-mipmaps|nomipmaps|no-mm|nomm",
+ 0,
+ "If reading a source, ignore mipmaps."
+ " This disables not the creation of mipmaps (see {-n-mipmaps})."
+ " @--no-mm@ is a short cut." },
+
+ { T_OPT_CP, "N_MIPMAPS", "n-mipmaps|nmipmaps|n-mm|nmm",
+ "num",
+ "Force the number of mipmaps. Values between 0 and 20 are allowed."
+ " Value @OFF@ (default) disables this option."
+ " If enabled, options @--max-mipmaps@ and @--mipmap-size@ are ignored."
+ " The creation of mipmaps stops if the width or the height"
+ " of the mipmap becomes 0. @--n-mm@ is a short cut." },
+
+ { T_OPT_CP, "MAX_MIPMAPS", "max-mipmaps|maxmipmaps|max-mm|maxmm",
+ "num",
+ "Control the automatic mipmap creation."
+ " Values between 0 and 20 are allowed and the default is 4."
+ " The mipmap creation for an image stops, if the set number is reached."
+ " This option is ignored, if @--n-mipmaps@ is enabled."
+ " @--max-mm@ is a short cut." },
+
+ { T_OPT_CP, "MIPMAP_SIZE", "mipmap-size|mipmapsize|mm-size|mmsize",
+ "num",
+ "Define the minimal width and minimal height of a generated mipmap."
+ " Any value >0 is allowed. The default is 8."
+ " This option is ignored, if @--n-mipmaps@ is enabled."
+ " @--mm-size@ is a short cut." },
+
+ { T_OPT_C, "FAST_MIPMAPS", "fast-mipmaps|fastmipmaps|fast-mm|fastmm",
+ 0,
+ "If resizing an image, use the old fast resize algorithm"
+ " (default until v1.64a) instead of the new smart one."
+ " Both algorithms differ only, when creating a mipmap for images"
+ " with odd width or odd height."
+ " The old algorithm is faster (factor 2-4) than the default algorithm,"
+ " but the new algorithm creates better resized images."
+ "\1 See https://szs.wiimm.de/doc/img/resize for details."
+ "\3 @--fast-mm@ is a short cut." },
+
+ { T_OPT_CP, "CMPR_DEFAULT", "cmpr-default",
+ "rgb1[,rgb2]",
+ "Define 2 colors for the case, that all 16 pixels of a CMPR block"
+ " are transparent. The default is to calculate an average color"
+ " of all transparent pixels. Before v2.04 white was used."
+ "\n "
+ " 2 RGB values (hex values with 6 digits each) are expected as parameter."
+ " If optional @RGB2@ is missed, a copy of @RGB1@ is used."
+ " As first step, both colors are converted to RGB565 colors @C1@ and @C2@"
+ " and sorted, so that @C1<C2@ (mandatory for CMPR)."
+ " If @C1@ and @C2@ are identical, the least significant bit of green"
+ " is cleared for @C1@ and set for @C2@."
+ "\n "
+ " Use parameter '@0@' to force black, '@-1@' to force white,"
+ " or '@-@' to reset to auto calculation." },
+
+ { T_OPT_C, "CUT", "cut",
+ 0,
+ "Cut different non archive files into smaller peaces"
+ " (logical units like headers, groups, sections) or list these"
+ " peaces as single sub files for a more detailed analysis."
+ " Supported file types are @BMG, BREFT-IMG, KMP, PAT, TEX, TPL,"
+ " BRRES@ sub files and more." },
+
+ { T_OPT_CM, "ALL", "a|all",
+ 0,
+ "Extract and decode all known and supported files recursively."
+ " This is a short cut for {--recurse --decode --mipmaps}."
+ " If entered twice, option {--cut} is included too." },
+
+ { T_OPT_C, "RAW", "raw",
+ 0,
+ "Extract BRRES sub file in raw mode and do not adjust"
+ " string pointers and other offsets." },
+
+ { T_SEP_OPT, 0,0,0,0 }, //----- separator -----
+
+ { T_OPT_C, "SECTIONS", "sections",
+ 0,
+ "Print in machine readable sections and parameter lines." },
+ //"\1 Read https://szs.wiimm.de/opt/sections for more details." },
+
+ //
+ //---------- wszst GROUP TRANSFORM ----------
+
+ { T_GRP_BEG, "TRANSFORM", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+ { T_COPT, "SCALE", 0,0,0 },
+ { T_COPT, "SHIFT", 0,0,0 },
+ { T_COPT, "XSS", 0,0,0 },
+ { T_COPT, "YSS", 0,0,0 },
+ { T_COPT, "ZSS", 0,0,0 },
+ { T_COPT, "ROT", 0,0,0 },
+ { T_COPT, "XROT", 0,0,0 },
+ { T_COPT, "YROT", 0,0,0 },
+ { T_COPT, "ZROT", 0,0,0 },
+ { T_COPT, "YPOS", 0,0,0 },
+ { T_COPT, "TRANSLATE", 0,0,0 },
+ { T_COPT, "NULL", 0,0,0 },
+ { T_COPT, "NEXT", 0,0,0 },
+ { T_COPT, "ASCALE", 0,0,0 },
+ { T_COPT, "AROT", 0,0,0 },
+ { T_COPT, "TFORM_SCRIPT", 0,0,0 },
+
+ //---------- wszst GROUP TRANSFORM2 ----------
+
+ { T_GRP_BEG, "TRANSFORM2", 0,0,0 },
+
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+ { T_COPT, "RM_GOBJ", 0,0,0 },
+ { T_COPT, "SLOT", 0,0,0 },
+ { T_COPT, "LOAD_KCL", 0,0,0 },
+ { T_COPT, "KCL", 0,0,0 },
+ { T_COPT, "KCL_FLAG", 0,0,0 },
+ { T_COPT, "KCL_SCRIPT", 0,0,0 },
+ { T_COPT, "TRI_AREA", 0,0,0 },
+ { T_COPT, "TRI_HEIGHT", 0,0,0 },
+ { T_COPT, "KMP", 0,0,0 },
+ { T_COPT, "SPEED_MOD", 0,0,0 },
+ { T_COPT, "KTPT2", 0,0,0 },
+ { T_COPT, "TFORM_KMP", 0,0,0 },
+ { T_COPT, "REPAIR_XPF", 0,0,0 },
+ { T_COPT, "MDL", 0,0,0 },
+ { T_COPT, "MINIMAP", 0,0,0 },
+ { T_COPT, "PAT", 0,0,0 },
+ { T_COPT, "PATCH_FILE", 0,0,0 },
+ { T_COPT, "LT_CLEAR", 0,0,0 },
+ { T_COPT, "LT_ONLINE", 0,0,0 },
+ { T_COPT, "LT_N_PLAYERS", 0,0,0 },
+ { T_COPT, "LT_COND_BIT", 0,0,0 },
+ { T_COPT, "LT_GAME_MODE", 0,0,0 },
+ { T_COPT, "LT_ENGINE", 0,0,0 },
+ { T_COPT, "LT_RANDOM", 0,0,0 },
+ { T_COPT, "LEX_PURGE", 0,0,0 },
+ { T_COPT, "PATCH_BMG", 0,0,0 },
+ { T_COPT, "MACRO_BMG", 0,0,0 },
+ { T_COPT, "FILTER_BMG", 0,0,0 },
+
+ //---------- wszst GROUP DEST ----------
+
+ { T_GRP_BEG, "DEST", 0,0,0 },
+
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+ { T_COPT, "UPDATE", 0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "NUMBER", 0,0,0 },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+
+ //---------- wszst GROUP FFORMAT1 ----------
+
+ { T_GRP_BEG, "FFORMAT1", 0,0,0 },
+
+ { T_COPT, "U8", 0,0,0 },
+ { T_COPT, "WU8", 0,0,0 },
+ { T_COPT, "YAZ0", 0,0,0 },
+ { T_COPT, "YAZ1", 0,0,0 },
+ { H_COPT, "XYZ", 0,0,0 },
+ { T_COPT, "BZ", 0,0,0 },
+ { T_COPT, "SZS", 0,0,0 },
+ { H_COPT, "XWU8", 0,0,0 },
+ { T_COPT, "WBZ", 0,0,0 },
+
+ //---------- wszst GROUP FFORMAT2 ----------
+
+ { T_GRP_BEG, "FFORMAT2", 0,0,0 },
+
+ { T_COPT, "U8", 0,0,0 },
+ { T_COPT, "WU8", 0,0,0 },
+ { T_COPT, "PACK", 0,0,0 },
+ { T_COPT, "BRRES", 0,0,0 },
+ { T_COPT, "BREFF", 0,0,0 },
+ { T_COPT, "BREFT", 0,0,0 },
+ { T_COPT, "YAZ0", 0,0,0 },
+ { T_COPT, "YAZ1", 0,0,0 },
+ { H_COPT, "XYZ", 0,0,0 },
+ { T_COPT, "BZ", 0,0,0 },
+ { T_COPT, "SZS", 0,0,0 },
+ { H_COPT, "XWU8", 0,0,0 },
+ { T_COPT, "WBZ", 0,0,0 },
+
+ //
+ //---------- wszst GROUP SCRIPT ----------
+
+ { T_GRP_BEG, "SCRIPT", 0,0,0 },
+
+ { T_COPT, "SH", 0,0,0 },
+ { T_COPT, "BASH", 0,0,0 },
+ { T_COPT, "JSON", 0,0,0 },
+ { T_COPT, "PHP", 0,0,0 },
+ { T_COPT, "MAKEDOC", 0,0,0 },
+ { T_COPT, "VAR", 0,0,0 },
+ { T_COPT, "ARRAY", 0,0,0 },
+ { T_COPT, "AVAR", 0,0,0 },
+
+ //---------- wszst GROUP ALIGN ----------
+
+ { T_GRP_BEG, "ALIGN", 0,0,0 },
+
+ { T_COPT, "ALIGN_U8", 0,0,0 },
+ { T_COPT, "ALIGN_PACK", 0,0,0 },
+ { T_COPT, "ALIGN_BRRES", 0,0,0 },
+ { T_COPT, "ALIGN_BREFF", 0,0,0 },
+ { T_COPT, "ALIGN_BREFT", 0,0,0 },
+ { T_COPT, "ALIGN", 0,0,0 },
+
+ //---------- wszst GROUP TEXTOUT ----------
+
+ { T_GRP_BEG, "TEXTOUT", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0, NO_HEAD_SYNTAX },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "DELTA", 0,0,0 },
+ { T_COPT, "DIFF", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+ { T_COPT, "NO_PARAM", 0,0,0 },
+
+ //---------- wszst GROUP BMG ----------
+
+ { T_GRP_BEG, "BMG", 0,0,0 },
+
+ { T_COPT, "BMG_ENCODING", 0,0,0 },
+ { T_COPT, "BMG_INF_SIZE", 0,0,0 },
+ { T_COPT, "BMG_MID", 0,0,0 },
+ { T_COPT, "FORCE_ATTRIB", 0,0,0 },
+ { T_COPT, "DEF_ATTRIB", 0,0,0 },
+ { T_COPT, "NO_ATTRIB", 0,0,0 },
+ { T_COPT, "X_ESCAPES", 0,0,0 },
+ { T_COPT, "OLD_ESCAPES", 0,0,0 },
+ { T_COPT, "SINGLE_LINE", 0,0,0 },
+ { T_COPT, "NO_BMG_COLORS",0,0,0 },
+ { T_COPT, "BMG_COLORS", 0,0,0 },
+ { T_COPT, "NO_BMG_INLINE",0,0,0 },
+ { T_COPT, "LONG", 0,0, BMG_LONG_TEXT },
+ { T_COPT, "EXPORT", 0,0,0 },
+
+ //---------- wszst GROUP ENCODE ----------
+
+ { T_GRP_BEG, "ENCODE", 0,0,0 },
+
+ { T_COPT, "ENCODE_ALL", 0,0,0 },
+ { T_COPT, "ENCODE_IMG", 0,0,0 },
+ { T_COPT, "ALL", 0,0,
+ " Encode all files."
+ " This is a short cut for {--encode-all}"
+ " (and more options in the future)." },
+ { T_COPT, "NO_ENCODE", 0,0,0 },
+ { T_COPT, "NO_RECURSE", 0,0,0 },
+ { T_COPT, "NO_ECHO", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "TRANSFORM", 0,0,0 },
+ { T_COPT, "STRIP", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+
+ //---------- wszst GROUP CREATE ----------
+
+ { T_GRP_BEG, "CREATE", 0,0,0 },
+
+ { T_COPT, "IGNORE_SETUP", 0,0,0 },
+ { T_COPY_GRP, "FFORMAT2", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "PT_DIR", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPT, "RM_AIPARAM", 0,0,0 },
+ { T_COPY_GRP, "ALIGN", 0,0,0 },
+ { T_COPT, "LOGGING", 0,0,0 },
+ { T_COPY_GRP, "ENCODE", 0,0,0 },
+ { T_COPT, "AUTO_ADD", 0,0,0 },
+ { T_COPT, "MIPMAPS", 0,0,0 },
+ { T_COPT, "NO_MIPMAPS", 0,0,0 },
+ { T_COPT, "N_MIPMAPS", 0,0,0 },
+ { T_COPT, "MAX_MIPMAPS", 0,0,0 },
+ { T_COPT, "MIPMAP_SIZE", 0,0,0 },
+ { T_COPT, "FAST_MIPMAPS", 0,0,0 },
+ { T_COPT, "CMPR_DEFAULT", 0,0,0 },
+
+ //---------- wszst GROUP NORM ----------
+
+ { T_GRP_BEG, "NORM", 0,0,0 },
+
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPY_GRP, "ALIGN", 0,0,0 },
+ { T_COPT, "PT_DIR", 0,0,0 },
+ { T_COPT, "RM_AIPARAM", 0,0,0 },
+ { T_COPT, "AUTO_ADD", 0,0,0 },
+
+ //---------- wszst GROUP EXTRACT ----------
+
+ { T_GRP_BEG, "EXTRACT", 0,0,0 },
+
+ { T_COPT, "BASEDIR", 0,0,0 },
+ { T_COPT, "RECURSE", 0,0,0 },
+ { T_COPT, "EXT", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPT, "DECODE", 0,0,0 },
+ { T_COPT, "MIPMAPS", 0,0,0 },
+ { T_COPT, "NO_MIPMAPS", 0,0,0 },
+ { T_COPT, "FAST_MIPMAPS", 0,0,0 },
+ { T_COPT, "CMPR_DEFAULT", 0,0,0 },
+ { T_COPT, "CUT", 0,0,0 },
+ { T_COPT, "ALL", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_COPT, "RAW", 0,0,0 },
+
+
+ //
+ //---------- COMMAND wszst VERSION ----------
+
+ { T_CMD_BEG, "VERSION", 0,0,0 },
+
+ { T_COPT, "BRIEF", 0,0,
+ "Print only the version number, revision and system."
+ " If set twice, print only the version number." },
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print in long format. Ignored if option {--sections} is set." },
+
+ //---------- COMMAND wszst HELP ----------
+
+ { T_CMD_BEG, "HELP", 0,0,0 },
+
+ { T_COPT, "WIDTH", 0,0,0 },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wszst ARGTEST ----------
+
+ { T_CMD_BEG, "ARGTEST", 0,0,0 },
+
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wszst TEST ----------
+
+ { T_CMD_BEG, "TEST", 0,0,0 },
+
+ { T_COPT, "VERBOSE", 0,0,
+ "Print the matrices of transformations." },
+ { T_ALL_OPT, 0, 0,0,0 },
+
+ //---------- COMMAND wszst COLORS ----------
+
+ { T_CMD_BEG, "COLORS", 0,0,0 },
+
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print also a list of all colored text types."
+ " If set twice, include alternative names."
+ " If set three times, include raw color names." },
+ { T_COPT, "BRIEF", 0,0,
+ "Ignore option --long and print a single status line about current color settings." },
+
+ //---------- COMMAND wszst ERROR ----------
+
+ { T_CMD_BEG, "ERROR", 0,0,0 },
+
+ { T_COPT, "SECTIONS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print message text instead of message name." },
+ { T_COPT, "BRIEF", 0,0,
+ "Print message number instead of message name." },
+
+ //---------- COMMAND wszst FILETYPE ----------
+
+ { T_CMD_BEG, "FILETYPE", 0,0,0 },
+
+ { T_COPT, "LONG", 0,0,
+ "Print an additional column with the decompressed file type and version."
+ " If entered twice, a validation status column is added." },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wszst FILEATTRIB ----------
+
+ { T_CMD_BEG, "FILEATTRIB", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wszst BRSUB ----------
+
+ { T_CMD_BEG, "BRSUB", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "If set, print hints about unusual versions too."
+ " If set twice, print a status line for each found BRRES sub file." },
+
+ //---------- COMMAND wszst SYMBOLS ----------
+
+ { T_CMD_BEG, "SYMBOLS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+
+ //---------- COMMAND wszst FUNCTIONS ----------
+
+ { T_CMD_BEG, "FUNCTIONS", 0,0,0 },
+
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0, FUNCTION_BRIEF },
+ { T_COPT, "LONG", 0,0, FUNCTION_LONG },
+
+ //---------- COMMAND wszst CALCULATE ----------
+
+ { T_CMD_BEG, "CALCULATE", 0,0,0 },
+
+ { T_COPT, "CONST", 0,0,0 },
+
+ //---------- COMMAND wszst MATRIX ----------
+
+ { T_CMD_BEG, "MATRIX", 0,0,0 },
+
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "If set once, suppress vector dumps for transformation steps"
+ " and ignore option --long."
+ " If set twice, suppress vector dump for final transformation too." },
+ { T_COPT, "LONG", 0,0,
+ "If set once, print inverse matrix for the final transformation."
+ " If set twice, print inverse matrix for all transformations." },
+ { T_COPT, "QUIET", 0,0,
+ "Option --quiet is dedicated to automatic tests comparing"
+ " the old and new transformation algorithms."
+ " If set once, the tables are only printed, if the results differ."
+ " If set twice, nothing is printed at all"
+ " and only the exit status will inform about the results." },
+
+ //---------- COMMAND wszst FLOAT ----------
+
+ { T_CMD_BEG, "FLOAT", 0,0,0 },
+ { T_COPT, "ROUND", 0,0,0 },
+
+ //---------- COMMAND wszst VR_CALC ----------
+
+ { T_CMD_BEG, "VR_CALC", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress header and print only results for @VR_winner-VR_looser@." },
+
+ //---------- COMMAND wszst VR_RACE ----------
+
+ { T_CMD_BEG, "VR_RACE", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Print full matrix of delta values." },
+
+ //---------- COMMAND wszst AUTOADD ----------
+
+ { T_CMD_BEG, "AUTOADD", 0,0,0 },
+
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "QUIET", 0,0,
+ " If set, suppress logging." },
+ { T_COPT, "VERBOSE", 0,0,
+ "If set, list all missed and invalid files of the current"
+ " auto-add archive after the adding operation."
+ " If set twice, then additionally list all already"
+ " existing files in the current auto-add archive." },
+ { T_COPT, "DEST", 0,0,
+ "Define a destination directory as current auto-add archive."
+ " The default is the standard auto-add path."
+ " Try {AUTOADD} without sources to view the path." },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,
+ "Overwrite already existing files instead"
+ " of only adding new files to the auto-add archive." },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+
+ //---------- COMMAND wszst TRACKS ----------
+
+ { T_CMD_BEG, "TRACKS", 0,0,0 },
+
+ { T_COPT, "VERBOSE", 0,0,
+ "Print an additonally hex status value as second column before the file name."
+ " These values can be used to find a selection mask." },
+ { T_COPT, "ALL", 0,0,
+ "Print the '_d' files too."
+ " If set twice, print all files (same as -all)." },
+ { T_COPT, "LONG", 0,0,
+ "Print 5 non track files too."
+ " If set twice, print 4 more files with old BRRES sub file formats too." },
+ { T_COPT, "PIPE", 0,0,0 },
+ { T_COPT, "LOAD_BMG", 0,0,0 },
+
+ //---------- COMMAND wszst SCANCACHE ----------
+
+ { T_CMD_BEG, "SCANCACHE", 0,0,0 },
+ { T_COPT, "CACHE", 0,0,0 },
+ { T_COPT, "PURGE", 0,0,0 },
+
+ //---------- COMMAND wszst _EXPORT ----------
+
+ { T_CMD_BEG, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wszst _CODE ----------
+
+ { T_CMD_BEG, "CODE", 0,0,0 },
+
+ //---------- COMMAND wszst _RECODE ----------
+
+ { T_CMD_BEG, "RECODE", 0,0,0 },
+
+ //---------- COMMAND wszst _SUBFILE ----------
+
+ { T_CMD_BEG, "SUBFILE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+
+ //---------- COMMAND wszst LIST ----------
+
+ { T_CMD_BEG, "LIST", 0,0,0 },
+ { T_COPT, "RECURSE", 0,0,0 },
+ { T_COPT, "EXT", 0,0,0 },
+ { T_COPT, "CUT", 0,0,0 },
+ { T_COPT, "ALL", 0,0,0 },
+ { T_COPT_M, "LONG", 0,0,
+ "If set, the size of each file is printed."
+ " If set twice, offset and size are printed."
+ " If set three times, debugging mode is enabled." },
+ { T_COPT, "SORT", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPT, "RM_AIPARAM", 0,0,0 },
+ { T_COPT, "SLOT", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-L ----------
+
+ { T_CMD_BEG, "LIST_L", 0,0,0 },
+ { T_COPY_CMD, "LIST", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-LL ----------
+
+ { T_CMD_BEG, "LIST_LL", 0,0,0 },
+ { T_COPY_CMD, "LIST_L", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-LLL ----------
+
+ { T_CMD_BEG, "LIST_LLL", 0,0,0 },
+ { T_COPY_CMD, "LIST_LL", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-A ----------
+
+ { T_CMD_BEG, "LIST_A", 0,0,0 },
+ { T_COPY_CMD, "LIST_L", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-LLA ----------
+
+ { T_CMD_BEG, "LIST_LA", 0,0,0 },
+ { T_COPY_CMD, "LIST_A", 0,0,0 },
+
+ //---------- COMMAND wszst LIST-LLA ----------
+
+ { T_CMD_BEG, "NAME_REF", 0,0,0 },
+ { T_COPT, "SORT", 0,0,
+ "Define the sort order of the reference."
+ " @NONE@ (default) uses the order of the string pool."
+ " @BRRES@ orders in standard BRRES order by ASCCI value and case sensitive."
+ " @NAME@ similar to @BRRES@, but case insensitive."
+ " @OFFSET@ orders by the file offset of first usage." },
+ { T_COPT, "BRIEF", 0,0,
+ "If set, suppress the offsets of the strings."
+ " This makes comparisons after name changes easier."
+ " If set twice, suppress reference offsets too."
+ " If set 3 times, suppress all offsets." },
+ { T_COPT, "LONG", 0,0,
+ "If set, a list ordered by @NAME@ or @BRRES@ (default)"
+ " and a second list ordered by @OFFSET@ is printed."
+ " If set twice, a third list with order @NONE@ is appended." },
+
+ //---------- COMMAND wszst ILIST ----------
+
+ { T_CMD_BEG, "ILIST", 0,0,0 },
+ { T_COPT, "RECURSE", 0,0,0 },
+ { T_COPT, "ALL", 0,0,0 },
+ { T_COPT_M, "LONG", 0,0,
+ "If set, image width, height and size are printed."
+ " If set twice, a block info and attribites are printed too." },
+ { T_COPT, "SORT", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+
+ //---------- COMMAND wszst ILIST-L ----------
+
+ { T_CMD_BEG, "ILIST_L", 0,0,0 },
+ { T_COPY_CMD, "ILIST", 0,0,0 },
+
+ //---------- COMMAND wszst ILIST-LL ----------
+
+ { T_CMD_BEG, "ILIST_LL", 0,0,0 },
+ { T_COPY_CMD, "ILIST_L", 0,0,0 },
+
+ //---------- COMMAND wszst ILIST-A ----------
+
+ { T_CMD_BEG, "ILIST_A", 0,0,0 },
+ { T_COPY_CMD, "ILIST", 0,0,0 },
+
+ //---------- COMMAND wszst ILIST-LA ----------
+
+ { T_CMD_BEG, "ILIST_LA", 0,0,0 },
+ { T_COPY_CMD, "ILIST_A", 0,0,0 },
+
+ //---------- COMMAND wszst MEMORY ----------
+
+ { T_CMD_BEG, "MEMORY", 0,0,0 },
+ { T_COPT, "RECURSE", 0,0,0 },
+ { T_COPT, "EXT", 0,0,0 },
+ { T_COPT, "DECODE", 0,0,
+ "Decode binary files to find memory addresses of sections." },
+ { T_COPT, "MIPMAPS", 0,0,
+ "Analyze images and dump mipmap adresses too." },
+ { T_COPT, "CUT", 0,0,0 },
+ { T_COPT, "ALL", 0,0,
+ "A short cut for {--recurse --decode --mipmaps}."
+ " If entered twice, option --cut is included too." },
+ { T_COPT_M, "LONG", 0,0,
+ "If set, print absolute offsets too." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPT, "RM_AIPARAM", 0,0,0 },
+ { T_COPT, "SLOT", 0,0,0 },
+
+ //---------- COMMAND wszst MEMORY-A ----------
+
+ { T_CMD_BEG, "MEMORY_A", 0,0,0 },
+ { T_COPY_CMD, "MEMORY", 0,0,0 },
+
+ //---------- COMMAND wszst DUMP ----------
+
+ { T_CMD_BEG, "DUMP", 0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+
+ //---------- COMMAND wszst SHA1 ----------
+
+ { T_CMD_BEG, "SHA1", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "ID", 0,0,0 },
+ { T_COPT, "BASE64", 0,0,0 },
+ { T_COPT, "DB64", 0,0,0 },
+ { T_COPT, "CODING", 0,0,0 },
+ { T_COPT, "VERIFY", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress output of the filename." },
+ { T_COPT, "LONG", 0,0,
+ "If set and {--db64} is not active,"
+ " start the line with the length of the decompressed source"
+ " as decimal number (field width 9)"
+ " separated with a comma from the SHA1 checksum."
+ " If set twice, prefix each line with the modification time"
+ " in the format @'yyyy-mm-dd HH:MM:SS '@."
+ "\n "
+ " If set and {--db64} is active, then CKPT lap counter, STGI lap counter,"
+ " speed factor and slot info are inserted beteen checksum and filename."
+ " All columns are separated by one or two spaces." },
+
+ //---------- COMMAND wszst ANALYZE ----------
+
+ { T_CMD_BEG, "ANALYZE", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "Append a list of special files with size, SHA1 and file name." },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "QUIET", 0,0,
+ "Suppress logging of input and output files." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "SCRIPT", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+
+ //---------- COMMAND wszst DISTRIBUTION ----------
+
+ { T_CMD_BEG, "DISTRIBUTION", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NORM", 0,0,0 },
+ { T_COPT, "LINKS", 0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "BASE64", 0,0,0 },
+ { T_COPT, "DB64", 0,0,0 },
+ { T_COPT, "CODING", 0,0,0 },
+ { T_COPT, "SOURCE", 0,0,
+ "Define a text file for filename to slot translation."
+// " The file is either a BMG file, or a CT-CODE file,"
+// " or a plain text file with a »slot filename« list."
+ " A »slot filename« list is expected."
+ " Use this option multiple times to define more than one source file."
+ " A definition of a later source overwrites previous definitions."
+ " The file @RESULT@ of the command line is appended automatically"
+ " as last entry, if exists and not already included." },
+
+ //---------- COMMAND wszst DIFF ----------
+
+ { T_CMD_BEG, "DIFF", 0,0,0 },
+ { T_COPT, "QUIET", 0,0,
+ "If set once, only a summary status for each section is printed."
+ " If set twice, only a total summary status is printed."
+ " If set three times, the status is only reported as exit status." },
+ { T_COPT, "RECURSE", 0,0,0 },
+ { T_COPT, "CUT", 0,0,0 },
+ { T_COPT, "ALL", 0,0,0 },
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+
+ //---------- COMMAND wszst CHECK ----------
+
+ { T_CMD_BEG, "CHECK", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,
+ "Don't check the KCL and KMP files." },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print only warnings and suppress hints." },
+ { T_COPT, "LONG", 0,0,
+ "Be verbose and print more statistics." },
+ { T_COPT, "QUIET", 0,0,
+ "Be quiet until the first warning or hint is found." },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst SLOTS ----------
+
+ { T_CMD_BEG, "SLOTS", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "Print the slot list in a compressed form without spaces." },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst STGI ----------
+
+ { T_CMD_BEG, "STGI", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,
+ "If set, ignore non existing source files"
+ " and files without KMP without warning."
+ " If set twice, ignore files with standard settings too." },
+
+ //---------- COMMAND wszst ISARENA ----------
+
+ { T_CMD_BEG, "ISARENA", 0,0,0 },
+ { T_COPT, "COLORS", 0,0,0 },
+ { T_COPT, "NO_COLORS", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,0 },
+ { T_COPT, "BRIEF", 0,0,
+ "If set, suppress the output of header and filenames." },
+ { T_COPT, "QUIET", 0,0,
+ "If set, print nothing and set only the exit status." },
+ { T_COPT, "IGNORE", 0,0,
+ "If set, ignore non existing source files"
+ " and files without KMP without warning." },
+
+ //---------- COMMAND wszst NORMALIZE ----------
+
+ { T_CMD_BEG, "NORMALIZE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "REMOVE_SRC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "FFORMAT1", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "NORM", 0,0,0 },
+ { T_COPT, "FAST", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst PATCH ----------
+
+ { T_CMD_BEG, "PATCH", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "REMOVE_SRC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "FFORMAT1", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "COMPRESS", 0,0,0 },
+ { T_COPY_GRP, "NORM", 0,0,0 },
+ { T_COPT, "FAST", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst COPY ----------
+
+ { T_CMD_BEG, "COPY", 0,0,0 },
+ { T_COPY_CMD, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wszst DUPLICATE ----------
+
+ { T_CMD_BEG, "DUPLICATE", 0,0,0 },
+ { T_COPT, "GAMEMODES", 0,0,0 },
+ { T_COPY_CMD, "PATCH", 0,0,0 },
+
+ //---------- COMMAND wszst MINIMAP ----------
+
+ { T_CMD_BEG, "MINIMAP", 0,0,0 },
+ { T_COPT, "LONG", 0,0,
+ "If set, print the matrices too."
+ " If set twice, print minimum and maximum values too." },
+ { T_COPT, "REMOVE_DEST", 0,0,0 },
+ { T_COPT, "PRESERVE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "COMPRESS", 0,0,0 },
+ { T_COPY_GRP, "NORM", 0,0,0 },
+ { T_COPT, "FAST", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "CONST", 0,0,0 },
+ { T_COPT, "TOUCH", 0,0,0 },
+ { T_COPT, "AUTO", 0,0,0 },
+ { T_COPT, "SET_FLAGS", 0,0,0 },
+ { T_COPT, "SET_SCALE", 0,0,0 },
+ { T_COPT, "SET_ROT", 0,0,0 },
+ { T_COPT, "SET_X", 0,0,0 },
+ { T_COPT, "SET_Y", 0,0,0 },
+ { T_COPT, "SET_Z", 0,0,0 },
+ { T_COPT, "XCENTER", 0,0,0 },
+ { T_COPT, "YCENTER", 0,0,0 },
+ { T_COPT, "ZCENTER", 0,0,0 },
+ { T_COPT, "CENTER", 0,0,0 },
+ { T_COPY_GRP, "TRANSFORM", 0,0,0 },
+
+ //---------- COMMAND wszst COMPRESS ----------
+
+ { T_CMD_BEG, "COMPRESS", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "REMOVE_SRC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "FFORMAT1", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "COMPRESS", 0,0,0 },
+ { T_COPY_GRP, "NORM", 0,0,0 },
+ { T_COPT, "FAST", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst DECOMPRESS ----------
+
+ { T_CMD_BEG, "DECOMPRESS", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "REMOVE_SRC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "U8", 0,0,0 },
+ { T_COPT, "WU8", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "NORM", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst ENCODE ----------
+
+ { T_CMD_BEG, "ENCODE", 0,0,0 },
+ { T_COPT, "IGNORE_SETUP", 0,0,0 },
+ { T_COPY_GRP, "ALIGN", 0,0,0 },
+ { T_COPT, "LOGGING", 0,0,0 },
+ { T_COPY_GRP, "ENCODE", 0,0,0 },
+ { T_COPT, "MIPMAPS", 0,0,0 },
+ { T_COPT, "NO_MIPMAPS", 0,0,0 },
+ { T_COPT, "N_MIPMAPS", 0,0,0 },
+ { T_COPT, "MAX_MIPMAPS", 0,0,0 },
+ { T_COPT, "MIPMAP_SIZE", 0,0,0 },
+ { T_COPT, "FAST_MIPMAPS", 0,0,0 },
+ { T_COPT, "CMPR_DEFAULT", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst CREATE ----------
+
+ { T_CMD_BEG, "CREATE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "CREATE", 0,0,0 },
+ { T_COPT, "NO_COMPRESS", 0,0,0 },
+ { T_COPT, "COMPRESS", 0,0,0 },
+ { T_COPT, "FAST", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst UPDATE ----------
+
+ { T_CMD_BEG, "UPDATE", 0,0,0 },
+ { T_COPT, "SOURCE", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "ESC", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "NO_COMPRESS", 0,0,0 },
+ { T_COPT, "COMPRESS", 0,0,0 },
+ { T_COPT, "FAST", 0,0,0 },
+ { T_COPT, "RECURSE", 0,0,0 },
+ { T_COPT, "ALL", 0,0,0 },
+ { T_COPY_GRP, "ENCODE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst EXTRACT ----------
+
+ { T_CMD_BEG, "EXTRACT", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPY_GRP, "EXTRACT", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { H_COPT, "ANALYZE", 0,0,0 },
+ { H_COPT, "ANALYZE_MODE", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst XDECODE ----------
+
+ { T_CMD_BEG, "XDECODE", 0,0,0 },
+ { T_COPY_CMD, "EXTRACT", 0,0,0 },
+
+ //---------- COMMAND wszst XEXPORT ----------
+
+ { T_CMD_BEG, "XEXPORT", 0,0,0 },
+ { T_COPY_CMD, "EXTRACT", 0,0,0 },
+
+ //---------- COMMAND wszst XALL ----------
+
+ { T_CMD_BEG, "XALL", 0,0,0 },
+ { T_COPY_CMD, "EXTRACT", 0,0,0 },
+
+ //---------- COMMAND wszst XCOMMON ----------
+
+ { T_CMD_BEG, "XCOMMON", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+
+ //---------- COMMAND wszst BINARY ----------
+
+ { T_CMD_BEG, "BINARY", 0,0,0 },
+ { T_COPT, "KMG_LIMIT", 0,0,0 },
+ { T_COPT, "KMG_COPY", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+
+ //---------- COMMAND wszst TEXT ----------
+
+ { T_CMD_BEG, "TEXT", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "DECODE", 0,0,0 },
+ { T_COPT, "KMG_LIMIT", 0,0,0 },
+ { T_COPT, "KMG_COPY", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPY_GRP, "BMG", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+
+ //---------- COMMAND wszst CAT ----------
+
+ { T_CMD_BEG, "CAT", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "DECODE", 0,0,0 },
+ { T_COPY_GRP, "TEXTOUT", 0,0,0 },
+ { T_COPY_GRP, "BMG", 0,0,0 },
+
+ //---------- COMMAND wszst BMG ----------
+
+ { T_CMD_BEG, "BMG", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0, NO_HEAD_SYNTAX },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPY_GRP, "BMG", 0,0,0 },
+
+ //---------- COMMAND wszst KCL ----------
+
+ { T_CMD_BEG, "KCL", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0, NO_HEAD_SYNTAX },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "NO_PARAM", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst KMP ----------
+
+ { T_CMD_BEG, "KMP", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0, NO_HEAD_SYNTAX },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+ { T_COPT, "NO_PARAM", 0,0,0 },
+ { T_COPT, "NO_CHECK", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "TRANSFORM2", 0,0,0 },
+
+ //---------- COMMAND wszst LEX ----------
+
+ { T_CMD_BEG, "LEX", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0, NO_HEAD_SYNTAX },
+ { T_COPT, "BRIEF", 0,0,0 },
+ { T_COPT, "EXPORT", 0,0,0 },
+
+ //---------- COMMAND wszst INFO ----------
+
+ { T_CMD_BEG, "INFO", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress output of the printed filename." },
+
+ //---------- COMMAND wszst GHOST ----------
+
+ { T_CMD_BEG, "GHOST", 0,0,0 },
+ { T_COPT, "IGNORE", 0,0,0 },
+ { T_COPT, "NO_HEADER", 0,0,
+ "Suppress output of the printed filename." },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPY_GRP, "SCRIPT", 0,0,0 },
+ { T_SEP_OPT, 0,0,0,0 },
+ { T_COPT, "DEST", 0,0,0 },
+ { T_COPT, "DEST2", 0,0,0 },
+
+ //---------- COMMAND wszst YAZDUMP ----------
+
+ { T_CMD_BEG, "YAZDUMP", 0,0,0 },
+ { T_COPY_GRP, "DEST", 0,0,0 },
+
+ //---------- COMMAND wszst VEHICLE ----------
+
+ { T_CMD_BEG, "VEHICLE", 0,0,0 },
+ { T_COPT, "SOURCE", 0,0,
+ "Load the file instead of using the internal base." },
+ { T_COPT, "DEST", 0,0,
+ "Define a destination path (directory/file)."
+ " The destination @-@ means: write to standard output." },
+ { T_COPT, "DEST2", 0,0,0 },
+ { T_COPT, "OVERWRITE", 0,0,0 },
+ { T_COPT, "QUIET", 0,0,
+ "Suppress logging." },
+ { T_COPT, "VERBOSE", 0,0,
+ "Log patching." },
+ { T_COPT, "BRIEF", 0,0,
+ "Suppress min/max counts on dumps." },
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/src/ui/ui-wbmgt.c b/project/src/ui/ui-wbmgt.c
new file mode 100644
index 0000000..b3836f2
--- /dev/null
+++ b/project/src/ui/ui-wbmgt.c
@@ -0,0 +1,1695 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wbmgt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set, the information header in decoded text files is suppressed"
+ " (for historical reasons same as --no-header). If set at least twice,"
+ " all comments are suppressed and the output is packed without empty"
+ " lines. If set 3 times, the #BMG file indentification is also"
+ " suppressed."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_ALIGN, false, false, false, false, false, 0, "align",
+ "size",
+ "Define an align value for the sub sections in the archive. The value"
+ " must be a power of 2 and the default value is 32 (0x20)"
+ },
+
+ { OPT_PATCH_BMG, false, false, false, false, false, 'P', "patch-bmg",
+ "mode[cond][=param]",
+ "This option specifies a BMG patch mode. Some of the modes need a"
+ " parameter or a file name of a BMG patch file (raw or text BMG), both"
+ " separated by an equal sign. Modes with required file names are"
+ " PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL and NOTEQUAL."
+ " Modes with text parameter are FORMAT, REGEXP and RM-REGEXP. "
+ " Standalone modes are ID, ID-ALL, UNICODE, RM-ESCAPES, RM-CUPS,"
+ " CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY, LE-FILL,"
+ " X-COPY, X-FORCE-COPY and X-FILL. Unique abbreviations are allowed.\n"
+ " The optional condition COND is either '?MID' or '!MID'. In case of"
+ " '?MID', the patch is only applied if the message id MID already"
+ " exists. In case of '!MID', the patch is only applied if the message"
+ " id MID does not exists.\n"
+ " If this option is used multiple times, all patch files will be"
+ " processed in the entered order. --patch is a short cut. Read"
+ " https://szs.wiimm.de/opt/patch-bmg for more details."
+ },
+
+ { OPT_MACRO_BMG, false, false, false, false, false, 0, "macro-bmg",
+ "file",
+ "Load a BMG file and add the messages to the macro library; already"
+ " existing entries are replaced. The macro library is accessed by"
+ " escape sequence \\m{MID} as fallback, if the active file has not"
+ " already defined the message MID by itself."
+ },
+
+ { OPT_FILTER_BMG, false, false, false, false, false, 0, "filter-bmg",
+ "list",
+ "If this option is set, the BMG messages are filtered by this list."
+ " Only enabled messages are exported to the output BMG file (binary or"
+ " text).\n"
+ " The parameter is a list of message ids (short MID, 'Txx' or 'Uxx'"
+ " or Mxx' or hex number) or message ranges (MID:MID) or one of the"
+ " keywords NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT,"
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE),"
+ " LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS,"
+ " XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS,"
+ " GENERIC or ALL. If an element is preceded by a minus sign, it is"
+ " removed from the filter list (disabled).\n"
+ " With v2.01a, this option was renamed from --msg to the more"
+ " meaningful name --filter-bmg. The old name is still available.\n"
+ " Read https://szs.wiimm.de/opt/filter-bmg for more details."
+ },
+
+ { OPT_BMG_ENCODING, false, false, false, false, false, 0, "encoding",
+ "name",
+ "Force a BMG encoding for new BMG files. Accepted encoding names are:"
+ " CP-1252, UTF-16BE (or UTF-16), SHIFT-JIS, UTF-8 and AUTO for"
+ " automatic detection (default). Same keywords without minus signs are"
+ " accepted too.\n"
+ " Mario Kart Wii uses encoding UTF-16BE; the default if no other"
+ " encoding is defined."
+ },
+
+ { OPT_BMG_INF_SIZE, false, false, false, false, false, 0, "inf-size",
+ "size",
+ "Defines the 'INF1' size of new BMG files between 4 and 1000. The"
+ " first 4 bytes of a INF1 record is an offset into the string pool and"
+ " the remaining bytes the attributes. Maximal 40 attribute bytes are"
+ " supported and additional bytes are assumed to be NULL. All BMG files"
+ " of MKW have a size of 8."
+ },
+
+ { OPT_BMG_MID, true, false, false, false, false, 0, "bmg-mid",
+ "[mode]",
+ "Control the creation of BMG section MID1. Suppress the creation, if"
+ " mode is OFF. Force the creation, if mode is ON. On mode AUTO"
+ " (default), the source is analysed for the decision."
+ },
+
+ { OPT_FORCE_ATTRIB, false, false, false, false, false, 0, "force-attrib",
+ "attrib",
+ "Forces, that all attributes are set to this vector. See"
+ " https://szs.wiimm.de/doc/bmg/attrib for the syntax."
+ },
+
+ { OPT_DEF_ATTRIB, false, false, false, false, false, 0, "def-attrib",
+ "attrib",
+ "Define the default attributes for BMG files. If not set, the default"
+ " attributes are estimated. On text output, strings with default"
+ " attributes are printed without attribute vector. The usual default"
+ " attribute for MKW is [1]. See https://szs.wiimm.de/doc/bmg/attrib"
+ " for the syntax."
+ },
+
+ { OPT_NO_ATTRIB, false, false, false, false, false, 0, "no-attrib",
+ 0,
+ "Suppress the output of any BMG attributes if creating BMG text files."
+ },
+
+ { OPT_X_ESCAPES, false, false, false, false, false, 0, "x-escapes",
+ 0,
+ "Use \\x{} escapes instead of \\z{} escapes."
+ },
+
+ { OPT_OLD_ESCAPES, false, false, false, false, false, 0, "old-escapes",
+ 0,
+ "To be compatible with v1.43 and earlier, print 1A escape sequences"
+ " with total size of >12 bytes as single words using \\x{}. Also don't"
+ " use \\x{} and \\u{} with parameter lists."
+ },
+
+ { OPT_SINGLE_LINE, false, false, false, false, false, '1', "single-line",
+ 0,
+ "If set, don't print continuation lines for BMG text output. If set"
+ " twice, print only single text lines and suppress attributes like"
+ " option --no-attrib does it."
+ },
+
+ { OPT_NO_BMG_COLORS, false, false, false, false, false, 0, "no-bmg-colors",
+ 0,
+ "If set, suppress the output of '\\c{color}' escape sequences for"
+ " colors definitions in BMG text output to be compatible with old"
+ " versions of the tools."
+ },
+
+ { OPT_BMG_COLORS, false, false, false, false, false, 0, "bmg-colors",
+ 0,
+ "Force output of '\\c{color}' escape sequences with names, even for"
+ " foreign (not MKWii) BMG files."
+ },
+
+ { OPT_NO_BMG_INLINE, false, false, false, false, false, 0, "no-bmg-inline",
+ 0,
+ "Print BMG attributes as separate line before the message definition"
+ " to be compatible with versions until v1.39. The output for the"
+ " standard value 0x01000000 is always suppressed. This was the default"
+ " until v1.43."
+ },
+
+ { OPT_EXPORT, false, false, false, false, false, 'X', "export",
+ 0,
+ "Enable the export mode and create small and machine readable text"
+ " files for easy post processing. The option works similar like -HBl11"
+ " for BMG text files."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 31
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support. The optional parameter is"
+ " deprecated and ignored. See https://szs.wiimm.de/opt/lecode for"
+ " details."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, false, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, false, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_POINTS, false, false, false, false, false, 0, "points",
+ "list",
+ "This option creates the new message 3FF0 to hold a description of the"
+ " versus points table. It defines a new table for the points assigned"
+ " to players after a versus or room race. The parameter is a blank or"
+ " comma and slash (next row) separated list with numbers (points)"
+ " between 0 and 255 and the following keywords: NINTENDO, LINEAR, WIN,"
+ " WIN15, WIN25 to select a predefined table; NO-BONUS, BONUS, NULL,"
+ " ONE as options; N1..N12 to select the row for N players. See"
+ " https://szs.wiimm.de/opt/points for details."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 60
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_POINTS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print the table as comma separated lists in C notation."
+ };
+
+static const InfoOption_t option_cmd_POINTS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Append a string in --points format that defines the table. If set"
+ " twice, append up to 3 strings in different modes."
+ };
+
+static const InfoOption_t option_cmd_EXTRACT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Exclude the section header from output."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_POINTS, "POINTS", "PTS", 0 },
+ { CMD_REGEXP, "REGEXP", "RE", 0 },
+ { CMD_EXTRACT, "EXTRACT", 0, 0 },
+ { CMD_SECTIONS, "SECTIONS", 0, 0 },
+ { CMD_LIST, "LIST", "LS", 0 },
+ { CMD_LIST, "LL", 0, 0 },
+ { CMD_SLOTS, "SLOTS", 0, 0 },
+ { CMD_DIFF, "DIFF", "CMP", 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_MIX, "MIX", 0, 0 },
+ { CMD_IDENTIFIER, "IDENTIFIER", "ID", 0 },
+ { CMD_IDENTIFIER, "IDENTIFY", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+ { CMD_PATCH, "PATCH", "PAT", 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHBM:T:A:td:D:E:orupiP:1X";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "points", 1, 0, GO_POINTS },
+ { "pts", 1, 0, GO_POINTS },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "align", 1, 0, GO_ALIGN },
+ { "patch-bmg", 1, 0, 'P' },
+ { "patchbmg", 1, 0, 'P' },
+ { "pb", 1, 0, 'P' },
+ { "patch", 1, 0, 'P' },
+ { "macro-bmg", 1, 0, GO_MACRO_BMG },
+ { "macrobmg", 1, 0, GO_MACRO_BMG },
+ { "mb", 1, 0, GO_MACRO_BMG },
+ { "filter-bmg", 1, 0, GO_FILTER_BMG },
+ { "filterbmg", 1, 0, GO_FILTER_BMG },
+ { "fb", 1, 0, GO_FILTER_BMG },
+ { "msg", 1, 0, GO_FILTER_BMG },
+ { "encoding", 1, 0, GO_BMG_ENCODING },
+ { "bmg-encoding", 1, 0, GO_BMG_ENCODING },
+ { "bmgencoding", 1, 0, GO_BMG_ENCODING },
+ { "inf-size", 1, 0, GO_BMG_INF_SIZE },
+ { "infsize", 1, 0, GO_BMG_INF_SIZE },
+ { "bmg-inf-size", 1, 0, GO_BMG_INF_SIZE },
+ { "bmginfsize", 1, 0, GO_BMG_INF_SIZE },
+ { "bmg-mid", 2, 0, GO_BMG_MID },
+ { "bmgmid", 2, 0, GO_BMG_MID },
+ { "force-attrib", 1, 0, GO_FORCE_ATTRIB },
+ { "forceattrib", 1, 0, GO_FORCE_ATTRIB },
+ { "def-attrib", 1, 0, GO_DEF_ATTRIB },
+ { "defattrib", 1, 0, GO_DEF_ATTRIB },
+ { "no-attrib", 0, 0, GO_NO_ATTRIB },
+ { "noattrib", 0, 0, GO_NO_ATTRIB },
+ { "x-escapes", 0, 0, GO_X_ESCAPES },
+ { "xescapes", 0, 0, GO_X_ESCAPES },
+ { "old-escapes", 0, 0, GO_OLD_ESCAPES },
+ { "oldescapes", 0, 0, GO_OLD_ESCAPES },
+ { "single-line", 0, 0, '1' },
+ { "singleline", 0, 0, '1' },
+ { "no-bmg-colors", 0, 0, GO_NO_BMG_COLORS },
+ { "nobmgcolors", 0, 0, GO_NO_BMG_COLORS },
+ { "bmg-colors", 0, 0, GO_BMG_COLORS },
+ { "bmgcolors", 0, 0, GO_BMG_COLORS },
+ { "no-bmg-inline", 0, 0, GO_NO_BMG_INLINE },
+ { "nobmginline", 0, 0, GO_NO_BMG_INLINE },
+ { "export", 0, 0, 'X' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,
+ /* 0x031 1 */ OPT_SINGLE_LINE,
+ /* 0x032 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e */ 0,0,
+ /* 0x050 P */ OPT_PATCH_BMG,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,
+ /* 0x058 X */ OPT_EXPORT,
+ /* 0x059 */ 0,0,0,0, 0,0,0,0, 0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_POINTS,
+ /* 0x08b */ OPT_UTF_8,
+ /* 0x08c */ OPT_NO_UTF_8,
+ /* 0x08d */ OPT_FORCE,
+ /* 0x08e */ OPT_REPAIR_MAGICS,
+ /* 0x08f */ OPT_OLD,
+ /* 0x090 */ OPT_STD,
+ /* 0x091 */ OPT_NEW,
+ /* 0x092 */ OPT_EXTRACT,
+ /* 0x093 */ OPT_NUMBER,
+ /* 0x094 */ OPT_ALIGN,
+ /* 0x095 */ OPT_MACRO_BMG,
+ /* 0x096 */ OPT_FILTER_BMG,
+ /* 0x097 */ OPT_BMG_ENCODING,
+ /* 0x098 */ OPT_BMG_INF_SIZE,
+ /* 0x099 */ OPT_BMG_MID,
+ /* 0x09a */ OPT_FORCE_ATTRIB,
+ /* 0x09b */ OPT_DEF_ATTRIB,
+ /* 0x09c */ OPT_NO_ATTRIB,
+ /* 0x09d */ OPT_X_ESCAPES,
+ /* 0x09e */ OPT_OLD_ESCAPES,
+ /* 0x09f */ OPT_NO_BMG_COLORS,
+ /* 0x0a0 */ OPT_BMG_COLORS,
+ /* 0x0a1 */ OPT_NO_BMG_INLINE,
+ /* 0x0a2 */ OPT_SECTIONS,
+ /* 0x0a3 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
+ /* 0x0b0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[31] = // cmd #1
+{
+ 0,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1
+};
+
+static u8 option_allowed_cmd_HELP[31] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1
+};
+
+static u8 option_allowed_cmd_ARGTEST[31] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1
+};
+
+static u8 option_allowed_cmd_TEST[31] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1
+};
+
+static u8 option_allowed_cmd_COLORS[31] = // cmd #5
+{
+ 0,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_ERROR[31] = // cmd #6
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1
+};
+
+static u8 option_allowed_cmd_FILETYPE[31] = // cmd #7
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[31] = // cmd #8
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_POINTS[31] = // cmd #9
+{
+ 0,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_REGEXP[31] = // cmd #10
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_EXTRACT[31] = // cmd #11
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_SECTIONS[31] = // cmd #12
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_LIST[31] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_SLOTS[31] = // cmd #14
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_DIFF[31] = // cmd #15
+{
+ 0,0,0,0,1, 0,1,0,0,0, 0,0,0,0,1, 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_CAT[31] = // cmd #16
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,1,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 0
+};
+
+static u8 option_allowed_cmd_MIX[31] = // cmd #17
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,1,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 0
+};
+
+static u8 option_allowed_cmd_IDENTIFIER[31] = // cmd #18
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 0
+};
+
+static u8 option_allowed_cmd_DECODE[31] = // cmd #19
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 0
+};
+
+static u8 option_allowed_cmd_ENCODE[31] = // cmd #20
+{
+ 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,0,0, 0,0,0,0,0,
+ 0
+};
+
+static u8 option_allowed_cmd_PATCH[31] = // cmd #21
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_POINTS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_POINTS[] =
+{
+ OptionInfo + OPT_POINTS,
+ &option_cmd_POINTS_BRIEF,
+ &option_cmd_POINTS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_REGEXP[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXTRACT[] =
+{
+ &option_cmd_EXTRACT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SECTIONS[] =
+{
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SLOTS[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DIFF[] =
+{
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_ESC,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ OptionInfo + OPT_LONG,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MIX[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ OptionInfo + OPT_LONG,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_IDENTIFIER[] =
+{
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CT_CODE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ OptionInfo + OPT_LONG,
+ OptionInfo + OPT_EXPORT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ OptionInfo + OPT_LONG,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_ALIGN,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_PATCH[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ OptionInfo + OPT_LONG,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_ALIGN,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wbmgt",
+ 0,
+ "wbmgt [option]... command [option|parameter|file]...",
+ "Wiimms BMG Tool : Convert and patch raw and text BMG (message) files.",
+ 0,
+ 23,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wbmgt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wbmgt HELP [--width=wd] OPT|OPTION ...\n"
+ "wbmgt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wbmgt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wbmgt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wbmgt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wbmgt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 0,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wbmgt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wbmgt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wbmgt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wbmgt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_POINTS,
+ false,
+ false,
+ false,
+ "POINTS",
+ "PTS",
+ "wbmgt POINTS [--points=list]",
+ "Print a table with the points assigned to player after a versus or"
+ " room race.",
+ 0,
+ 3,
+ option_tab_cmd_POINTS,
+ option_allowed_cmd_POINTS
+ },
+
+ { CMD_REGEXP,
+ false,
+ false,
+ false,
+ "REGEXP",
+ "RE",
+ "wbmgt REGEXP pattern string...",
+ "Test implementation of regular expressions. PATTERN is the regular"
+ " expression to find matches. Each STRING is object of the match and"
+ " replace operation.",
+ 0,
+ 0,
+ option_tab_cmd_REGEXP,
+ option_allowed_cmd_REGEXP
+ },
+
+ { CMD_EXTRACT,
+ false,
+ false,
+ true,
+ "EXTRACT",
+ 0,
+ "wbmgt EXTRACT name source",
+ "Extract BMG section NAME of file SOURCE and write the binary data to"
+ " standard output. If NAME consists of less than 4 characters, then"
+ " the first section that starts with these characters is dumped.",
+ 0,
+ 1,
+ option_tab_cmd_EXTRACT,
+ option_allowed_cmd_EXTRACT
+ },
+
+ { CMD_SECTIONS,
+ false,
+ false,
+ false,
+ "SECTIONS",
+ 0,
+ "wbmgt SECTIONS [source]...",
+ "List all sections of each binary BMG file. Print offset, size, magic"
+ " and a short info. If known, print number and size of elements too.",
+ 0,
+ 1,
+ option_tab_cmd_SECTIONS,
+ option_allowed_cmd_SECTIONS
+ },
+
+ { CMD_LIST,
+ false,
+ false,
+ false,
+ "LIST",
+ "LS",
+ "wbmgt LIST [source]...",
+ "List messages to proof the content. Patches are applied before"
+ " listing. The lines are cut to fit the terminal width.",
+ 0,
+ 5,
+ option_tab_cmd_LIST,
+ option_allowed_cmd_LIST
+ },
+
+ { CMD_SLOTS,
+ false,
+ false,
+ false,
+ "SLOTS",
+ 0,
+ "wbmgt SLOTS [source]...",
+ "Print a slot ordered list with slot number, message id, delta and"
+ " attributes. Patches are applied before listing.",
+ 0,
+ 5,
+ option_tab_cmd_SLOTS,
+ option_allowed_cmd_SLOTS
+ },
+
+ { CMD_DIFF,
+ false,
+ false,
+ false,
+ "DIFF",
+ "CMP",
+ "wbmgt DIFF source1 source2\n"
+ "wbmgt DIFF source... --dest dest\n",
+ "Compare two or more BMG (raw or text) files on string level and"
+ " report mismatches for each string. If option --dest is set, then"
+ " each source file is compared with a file in the destination. Patches"
+ " are applied to all sources before comparing.",
+ 0,
+ 6,
+ option_tab_cmd_DIFF,
+ option_allowed_cmd_DIFF
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ true,
+ "CAT",
+ 0,
+ "wbmgt CAT [source]...",
+ "Read the entered BMG files (text, binary or szs sub file) and print"
+ " them as decoded text files to standard output. All BMG files of a"
+ " single archive (SZS,...) are combined to 1 source. The output of all"
+ " source files is concatenated.",
+ 0,
+ 20,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_MIX,
+ false,
+ false,
+ false,
+ "MIX",
+ 0,
+ "wbmgt MIX [source]...",
+ "Read the entered BMG files (text, binary or szs sub file) and print"
+ " them as decoded text files to standard output. All BMG files of all"
+ " archives (SZS,...) are read. The output of all source files is"
+ " combined and strings of later source files override prior defined"
+ " strings.",
+ 0,
+ 20,
+ option_tab_cmd_MIX,
+ option_allowed_cmd_MIX
+ },
+
+ { CMD_IDENTIFIER,
+ false,
+ false,
+ false,
+ "IDENTIFIER",
+ "ID",
+ "wbmgt IDENTIFIER",
+ "Create a simple text BMG with the identifier message 3DEF only with"
+ " respect to options --le-code and --ct-code. Print the result to"
+ " standard output.",
+ 0,
+ 18,
+ option_tab_cmd_IDENTIFIER,
+ option_allowed_cmd_IDENTIFIER
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wbmgt DECODE [szs]...",
+ "Read the entered message files and decode them to text files. All BMG"
+ " files of a single archive (SZS,...) are concatenated to 1 source."
+ " This command is similar to PATCH, but the result is always decoded."
+ " The default destination is '%P/%N.txt'.",
+ 0,
+ 28,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "ENCODE",
+ "ENC",
+ "wbmgt ENCODE [source]...",
+ "Read the entered message files and encode them to BMG files. All BMG"
+ " files of a single archive (SZS,...) are concatenated to 1 source."
+ " This command is similar to PATCH, but the result is always encoded."
+ " The default destination is '%P/%N.bmg'.",
+ 0,
+ 17,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ { CMD_PATCH,
+ false,
+ false,
+ false,
+ "PATCH",
+ "PAT",
+ "wbmgt PATCH [source]...",
+ "Patch the entered files by using the patch list specified by option"
+ " --patch-bmg. The coding of the source files is not changed. The"
+ " default destination is '%P/%F'.\n"
+ " Use 'wszst patch --patch-bmg ...' to patch BMG files within a SZS"
+ " file.",
+ 0,
+ 29,
+ option_tab_cmd_PATCH,
+ option_allowed_cmd_PATCH
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wbmgt =
+{
+ "wbmgt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wbmgt.h b/project/src/ui/ui-wbmgt.h
new file mode 100644
index 0000000..4dceb36
--- /dev/null
+++ b/project/src/ui/ui-wbmgt.h
@@ -0,0 +1,417 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WBMGT_H
+#define SZS_UI_WBMGT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_ALIGN,
+ OPT_PATCH_BMG,
+ OPT_MACRO_BMG,
+ OPT_FILTER_BMG,
+ OPT_BMG_ENCODING,
+ OPT_BMG_INF_SIZE,
+ OPT_BMG_MID,
+ OPT_FORCE_ATTRIB,
+ OPT_DEF_ATTRIB,
+ OPT_NO_ATTRIB,
+ OPT_X_ESCAPES,
+ OPT_OLD_ESCAPES,
+ OPT_SINGLE_LINE,
+ OPT_NO_BMG_COLORS,
+ OPT_BMG_COLORS,
+ OPT_NO_BMG_INLINE,
+ OPT_EXPORT,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 31
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_POINTS,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 60
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_ALIGN = 1llu << OPT_ALIGN,
+// OB_PATCH_BMG = 1llu << OPT_PATCH_BMG,
+// OB_MACRO_BMG = 1llu << OPT_MACRO_BMG,
+// OB_FILTER_BMG = 1llu << OPT_FILTER_BMG,
+// OB_BMG_ENCODING = 1llu << OPT_BMG_ENCODING,
+// OB_BMG_INF_SIZE = 1llu << OPT_BMG_INF_SIZE,
+// OB_BMG_MID = 1llu << OPT_BMG_MID,
+// OB_FORCE_ATTRIB = 1llu << OPT_FORCE_ATTRIB,
+// OB_DEF_ATTRIB = 1llu << OPT_DEF_ATTRIB,
+// OB_NO_ATTRIB = 1llu << OPT_NO_ATTRIB,
+// OB_X_ESCAPES = 1llu << OPT_X_ESCAPES,
+// OB_OLD_ESCAPES = 1llu << OPT_OLD_ESCAPES,
+// OB_SINGLE_LINE = 1llu << OPT_SINGLE_LINE,
+// OB_NO_BMG_COLORS = 1llu << OPT_NO_BMG_COLORS,
+// OB_BMG_COLORS = 1llu << OPT_BMG_COLORS,
+// OB_NO_BMG_INLINE = 1llu << OPT_NO_BMG_INLINE,
+// OB_EXPORT = 1llu << OPT_EXPORT,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_TEXTOUT = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_BMG_ENCODING
+// | OB_BMG_INF_SIZE
+// | OB_BMG_MID
+// | OB_FORCE_ATTRIB
+// | OB_DEF_ATTRIB
+// | OB_NO_ATTRIB
+// | OB_X_ESCAPES
+// | OB_OLD_ESCAPES
+// | OB_SINGLE_LINE
+// | OB_NO_BMG_COLORS
+// | OB_BMG_COLORS
+// | OB_NO_BMG_INLINE
+// | OB_LONG
+// | OB_EXPORT,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_POINTS = OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_REGEXP = 0,
+//
+// OB_CMD_EXTRACT = OB_NO_HEADER,
+//
+// OB_CMD_SECTIONS = OB_IGNORE,
+//
+// OB_CMD_LIST = OB_IGNORE
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG,
+//
+// OB_CMD_SLOTS = OB_IGNORE
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG,
+//
+// OB_CMD_DIFF = OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG
+// | OB_DEST
+// | OB_ESC,
+//
+// OB_CMD_CAT = OB_GRP_TEXTOUT
+// | OB_IGNORE
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG,
+//
+// OB_CMD_MIX = OB_CMD_CAT,
+//
+// OB_CMD_IDENTIFIER = OB_GRP_TEXTOUT,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_IGNORE
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG,
+//
+// OB_CMD_ENCODE = OB_GRP_DEST
+// | OB_BMG_ENCODING
+// | OB_BMG_INF_SIZE
+// | OB_BMG_MID
+// | OB_FORCE_ATTRIB
+// | OB_IGNORE
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG
+// | OB_ALIGN,
+//
+// OB_CMD_PATCH = OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_IGNORE
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG
+// | OB_ALIGN,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_POINTS,
+ CMD_REGEXP,
+
+ CMD_EXTRACT,
+ CMD_SECTIONS,
+ CMD_LIST,
+ CMD_SLOTS,
+ CMD_DIFF,
+
+ CMD_CAT,
+ CMD_MIX,
+ CMD_IDENTIFIER,
+ CMD_DECODE,
+ CMD_ENCODE,
+ CMD_PATCH,
+
+
+ CMD__N // == 22
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO_SINGLE_LINE = '1',
+
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_PATCH_BMG = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+ GO_EXPORT = 'X',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_POINTS,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_ALIGN,
+ GO_MACRO_BMG,
+ GO_FILTER_BMG,
+ GO_BMG_ENCODING,
+ GO_BMG_INF_SIZE,
+ GO_BMG_MID,
+ GO_FORCE_ATTRIB,
+ GO_DEF_ATTRIB,
+ GO_NO_ATTRIB,
+ GO_X_ESCAPES,
+ GO_OLD_ESCAPES,
+ GO_NO_BMG_COLORS,
+ GO_BMG_COLORS,
+ GO_NO_BMG_INLINE,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wbmgt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WBMGT_H
+
diff --git a/project/src/ui/ui-wctct.c b/project/src/ui/ui-wctct.c
new file mode 100644
index 0000000..cd7f2d6
--- /dev/null
+++ b/project/src/ui/ui-wctct.c
@@ -0,0 +1,1952 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wctct.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress cross reference comments."
+ },
+
+ { OPT_RAW, false, false, false, false, false, 0, "raw",
+ 0,
+ "Print BMG messages as UTF-8 text without escape sequences."
+ },
+
+ { OPT_BMG_ENCODING, false, false, false, false, false, 0, "bmg-encoding",
+ "name",
+ "Force a BMG encoding for new BMG files. Accepted encoding names are:"
+ " CP-1252, UTF-16BE (or UTF-16), SHIFT-JIS, UTF-8 and AUTO for"
+ " automatic detection (default). Same keywords without minus signs are"
+ " accepted too.\n"
+ " Mario Kart Wii uses encoding UTF-16BE; the default if no other"
+ " encoding is defined."
+ },
+
+ { OPT_BMG_INF_SIZE, false, false, false, false, false, 0, "bmg-inf-size",
+ "size",
+ "Defines the 'INF1' size of new BMG files between 4 and 1000. The"
+ " first 4 bytes of a INF1 record is an offset into the string pool and"
+ " the remaining bytes the attributes. Maximal 40 attribute bytes are"
+ " supported and additional bytes are assumed to be NULL. All BMG files"
+ " of MKW have a size of 8."
+ },
+
+ { OPT_BMG_MID, true, false, false, false, false, 0, "bmg-mid",
+ "[mode]",
+ "Control the creation of BMG section MID1. Suppress the creation, if"
+ " mode is OFF. Force the creation, if mode is ON. On mode AUTO"
+ " (default), the source is analysed for the decision."
+ },
+
+ { OPT_FORCE_ATTRIB, false, false, false, false, false, 0, "force-attrib",
+ "attrib",
+ "Forces, that all attributes are set to this vector. See"
+ " https://szs.wiimm.de/doc/bmg/attrib for the syntax."
+ },
+
+ { OPT_DEF_ATTRIB, false, false, false, false, false, 0, "def-attrib",
+ "attrib",
+ "Define the default attributes for BMG files. If not set, the default"
+ " attributes are estimated. On text output, strings with default"
+ " attributes are printed without attribute vector. The usual default"
+ " attribute for MKW is [1]. See https://szs.wiimm.de/doc/bmg/attrib"
+ " for the syntax."
+ },
+
+ { OPT_NO_ATTRIB, false, false, false, false, false, 0, "no-attrib",
+ 0,
+ "Suppress the output of any BMG attributes if creating BMG text files."
+ },
+
+ { OPT_X_ESCAPES, false, false, false, false, false, 0, "x-escapes",
+ 0,
+ "Use \\x{} escapes instead of \\z{} escapes."
+ },
+
+ { OPT_OLD_ESCAPES, false, false, false, false, false, 0, "old-escapes",
+ 0,
+ "To be compatible with v1.43 and earlier, print 1A escape sequences"
+ " with total size of >12 bytes as single words using \\x{}. Also don't"
+ " use \\x{} and \\u{} with parameter lists."
+ },
+
+ { OPT_SINGLE_LINE, false, false, false, false, false, '1', "single-line",
+ 0,
+ "If set, don't print continuation lines for BMG text output. If set"
+ " twice, print only single text lines but not value lines."
+ },
+
+ { OPT_NO_BMG_COLORS, false, false, false, false, false, 0, "no-bmg-colors",
+ 0,
+ "If set, suppress the output of '\\c{color}' escape sequences for"
+ " colors definitions in BMG text output to be compatible with old"
+ " versions of the tools."
+ },
+
+ { OPT_BMG_COLORS, false, false, false, false, false, 0, "bmg-colors",
+ 0,
+ "Force output of '\\c{color}' escape sequences with names, even for"
+ " foreign (not MKWii) BMG files."
+ },
+
+ { OPT_NO_BMG_INLINE, false, false, false, false, false, 0, "no-bmg-inline",
+ 0,
+ "Print BMG attributes as separate line before the message definition"
+ " to be compatible with versions until v1.39. The output for the"
+ " standard value 0x01000000 is always suppressed. This was the default"
+ " until v1.43."
+ },
+
+ { OPT_EXPORT, false, false, false, false, false, 'X', "export",
+ 0,
+ "Enable the export mode and create small and machine readable text"
+ " files for easy post processing. The option works similar like -HB"
+ " for CT-CODE output."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Do not make plausibility checks for KCL and KMP files."
+ },
+
+ { OPT_LIST, false, false, false, false, true, 0, "list",
+ 0,
+ "Cancel all previous --rel and --full and enter LIST mode (default)"
+ " for text output.\n"
+ " In LIST mode only a track list is generated. On scanning the tracks"
+ " are automatically distributed to the cups. This makes rearanging"
+ " very simple."
+ },
+
+ { OPT_REF, false, false, false, false, false, 0, "ref",
+ 0,
+ "Cancel all previous --list and --full and enter REFERENCE mode for"
+ " text output.\n"
+ " In REFERENCE mode all tracks and cups are printed separately. After"
+ " scanning the cup and track layout is the same as the original code"
+ " file."
+ },
+
+ { OPT_FULL, false, false, false, false, false, 0, "full",
+ 0,
+ "Cancel all previous --list and --rel and enter FULL mode for text"
+ " output.\n"
+ " FULL mode is a combination of LIST and REF modes."
+ },
+
+ { OPT_HEX, false, false, false, false, false, 0, "hex",
+ 0,
+ "Normally and if available, names are printed for music and property"
+ " slots. If this option is set, hex numbers are printed always."
+ },
+
+ { OPT_IMAGES, false, false, false, false, false, 0, "images",
+ "dir",
+ "If creating a CT-CODE BRRES or SZS file, then search the 8 strap"
+ " images in the specified directory. The images are searched with"
+ " extensions .png, .tex, .tex0 and without extension in this order"
+ " until a valid image is found. All images will be resized to the"
+ " correct width and height and converted to format TEX.RGB565 without"
+ " mipmaps. If no valid image is found, a hard coded default image is"
+ " used."
+ },
+
+ { OPT_LOAD_BMG, false, false, false, false, false, 0, "load-bmg",
+ "file",
+ "Load immediately the file to fill an internal message pool. The"
+ " option can be used multiple times to fill the message pool by"
+ " different sources. A later message overrides the previous message.\n"
+ " The internal message pool is patched by all --patch-bmg options."
+ },
+
+ { OPT_PATCH_BMG, false, false, false, false, false, 0, "patch-bmg",
+ "mode[cond][=param]",
+ "This option specifies a BMG patch mode. Some of the modes need a"
+ " parameter or a file name of a BMG patch file (raw or text BMG), both"
+ " separated by an equal sign. Modes with required file names are"
+ " PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL and NOTEQUAL."
+ " Modes with text parameter are FORMAT, REGEXP and RM-REGEXP. "
+ " Standalone modes are ID, ID-ALL, UNICODE, RM-ESCAPES, RM-CUPS,"
+ " CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY, LE-FILL,"
+ " X-COPY, X-FORCE-COPY and X-FILL. Unique abbreviations are allowed.\n"
+ " The optional condition COND is either '?MID' or '!MID'. In case of"
+ " '?MID', the patch is only applied if the message id MID already"
+ " exists. In case of '!MID', the patch is only applied if the message"
+ " id MID does not exists.\n"
+ " If this option is used multiple times, all patch files will be"
+ " processed in the entered order. Read"
+ " https://szs.wiimm.de/opt/patch-bmg for more details."
+ },
+
+ { OPT_MACRO_BMG, false, false, false, false, false, 0, "macro-bmg",
+ "file",
+ "Load a BMG file and add the messages to the macro library; already"
+ " existing entries are replaced. The macro library is accessed by"
+ " escape sequence \\m{MID} as fallback, if the active file has not"
+ " already defined the message MID by itself."
+ },
+
+ { OPT_FILTER_BMG, false, false, false, false, false, 0, "filter-bmg",
+ "list",
+ "If this option is set, the BMG messages are filtered by this list."
+ " Only enabled messages are exported to the output BMG file (binary or"
+ " text).\n"
+ " The parameter is a list of message ids (short MID, 'Txx' or 'Uxx'"
+ " or Mxx' or hex number) or message ranges (MID:MID) or one of the"
+ " keywords NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT,"
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE),"
+ " LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS,"
+ " XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS,"
+ " GENERIC or ALL. If an element is preceded by a minus sign, it is"
+ " removed from the filter list (disabled).\n"
+ " With v2.01a, this option was renamed from --msg to the more"
+ " meaningful name --filter-bmg. The old name is still available.\n"
+ " Read https://szs.wiimm.de/opt/filter-bmg for more details."
+ },
+
+ { OPT_PATCH_NAMES, false, false, false, false, false, 0, "patch-names",
+ 0,
+ "If set, the names of the CUP1 and CSR1 sections are patched by the"
+ " loaded BMG files directly after loading the source files."
+ },
+
+ { OPT_ORDER_BY, false, false, false, false, false, 0, "order-by",
+ "bmg",
+ "Load the BMG file and filter track names. Then before creating output"
+ " files, re-distribute the tracks of the additonal cups (9-) to the"
+ " same cups by the order of the read track names. Tracks without BMG"
+ " reference are placed at the end of all tracks. This option modifes"
+ " only the track order of the cups, but will not change any name."
+ },
+
+ { OPT_ORDER_ALL, false, false, false, false, false, 0, "order-all",
+ 0,
+ "Used together with option --order-by: Re-distribute the tracks of all"
+ " cups beginning with Mushroom Cup."
+ },
+
+ { OPT_DYNAMIC, false, true, false, false, false, 0, "dynamic",
+ 0,
+ "Enable dynamic length calculation for the CTGP_CODE part. The"
+ " surrounding TEX and BRRES files are also adjusted. The usage of this"
+ " option is EXPERIMENTAL."
+ },
+
+ { OPT_WRITE_TRACKS, false, false, false, false, true, 0, "write-tracks",
+ "file",
+ "Create a machine readable file reflecting the racing track"
+ " distribution to the cups. One line of format 'IDX|MID|NAME' is"
+ " written for each track. --wtracks is a short cut."
+ },
+
+ { OPT_DEST, false, false, false, false, false, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 46
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support. The optional parameter is"
+ " deprecated and ignored. See https://szs.wiimm.de/opt/lecode for"
+ " details."
+ },
+
+ { OPT_OLD_SPINY, false, false, false, false, false, 0, "old-spiny",
+ 0,
+ "Disable the new feature to hold a Spiny Shell at the tail."
+ " https://szs.wiimm.de/opt/ctcode for details."
+ },
+
+ { OPT_CRS1, false, false, false, false, false, 0, "crs1",
+ "value",
+ "Store this value into all 8 members of the property array of the CRS1"
+ " header if reading a CT-TEXT. The default value is 0x800."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, true, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, true, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ { OPT_CT_DIR, false, false, false, false, true, 0, "ct-dir",
+ "dir",
+ "Define a search directory for CT-CODE parts and use the internal"
+ " copies only, if no valid file is found. Each file is searched"
+ " without and then with extension '.bz2'. For both cases bzip2 files"
+ " are detected and decompressed. Only files with correct file type are"
+ " accepted.\n"
+ " wctct will search in the sub directory 'rmc[pujk]/' for files"
+ " 'mod1.bin', 'mod2.bin', 'ovr1.bin' and 'bad1code.bin'.\n"
+ " Use this option multiple times to define more than one search"
+ " directory."
+ },
+
+ { OPT_CT_LOG, true, false, false, false, false, 0, "ct-log",
+ "[=level]",
+ "Define a log level for option --ct-dir. Without parameter, the"
+ " current level is increased. Allowed keywords are: 0=0FF, 1=SUCCESS,"
+ " 2=FOUND, 3=ALL"
+ },
+
+ { OPT_ALLOW_SLOTS, false, false, false, false, false, 0, "allow-slots",
+ "list",
+ "Allow and disallow slots for automatic slot assigning. A comma"
+ " separated list of slots (A), slot ranges (A:B) or keywords is"
+ " expected. If preceded by a minus sign, the slots are disabled. The"
+ " keywords are: TRACKS (slots 0:0x1f), ARENAS (0x20:0x29) and SPECIAL"
+ " (0x36:0x3a). CTCODE is an abbreviation for ARENAS,SPECIAL.\n"
+ " The default is to enable slot ranges 0x00:0x1f, 0x2a:0x35,"
+ " 0x3b:0x41 and 0x44:0xfe."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 79
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOPT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in CTC text files."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+static const InfoOption_t option_cmd_DUMP_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print headers as hexdump."
+ };
+
+static const InfoOption_t option_cmd_BMG_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Filter the message by tracks, that are used a racing track. If set"
+ " twice, suppress also tracks created by the 'N' command of CT-TEXT"
+ " files. If set 3 times, suppress always the output of first 32"
+ " tracks."
+ };
+
+static const InfoOption_t option_cmd_BMG_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Normally, only the track and arena names are exported. The message id"
+ " (MID) range is 4000-40FF. If set, cup names are exported too as MID"
+ " 4200-423F. If set twice, cup/track relations are also exported as"
+ " MID 4300-43FF."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the table header."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the music and property slots."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Include the first 32 standard tracks into the output. If set twice,"
+ " also include the battle arenas."
+ };
+
+static const InfoOption_t option_cmd_CREATE_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "BMG: Filter the message by tracks, that are used a racing track. If"
+ " set twice, suppress also tracks created by the 'N' command of"
+ " CT-TEXT files. If set 3 times, suppress always the output of first"
+ " 32 tracks."
+ };
+
+static const InfoOption_t option_cmd_CREATE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "BMG: Normally, only the track and arena names are exported. The"
+ " message id (MID) range is 4000-40FF. If set, cup names are exported"
+ " too as MID 4200-423F. If set twice, cup/track relations are also"
+ " exported as MID 4300-43FF."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_RAWDUMP, "_RAWDUMP", 0, 0 },
+ { CMD_DUMP, "D", "DUMP", 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_BMG, "BMG", 0, 0 },
+ { CMD_TRACKS, "TRACKS", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_CREATE, "CREATE", "C", 0 },
+ { CMD_PATCH, "PATCH", "P", 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHB1XPNM:T:A:td:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "old-spiny", 0, 0, GO_OLD_SPINY },
+ { "oldspiny", 0, 0, GO_OLD_SPINY },
+ { "crs1", 1, 0, GO_CRS1 },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "raw", 0, 0, GO_RAW },
+ { "bmg-encoding", 1, 0, GO_BMG_ENCODING },
+ { "bmgencoding", 1, 0, GO_BMG_ENCODING },
+ { "bmg-inf-size", 1, 0, GO_BMG_INF_SIZE },
+ { "bmginfsize", 1, 0, GO_BMG_INF_SIZE },
+ { "bmg-mid", 2, 0, GO_BMG_MID },
+ { "bmgmid", 2, 0, GO_BMG_MID },
+ { "force-attrib", 1, 0, GO_FORCE_ATTRIB },
+ { "forceattrib", 1, 0, GO_FORCE_ATTRIB },
+ { "def-attrib", 1, 0, GO_DEF_ATTRIB },
+ { "defattrib", 1, 0, GO_DEF_ATTRIB },
+ { "no-attrib", 0, 0, GO_NO_ATTRIB },
+ { "noattrib", 0, 0, GO_NO_ATTRIB },
+ { "x-escapes", 0, 0, GO_X_ESCAPES },
+ { "xescapes", 0, 0, GO_X_ESCAPES },
+ { "old-escapes", 0, 0, GO_OLD_ESCAPES },
+ { "oldescapes", 0, 0, GO_OLD_ESCAPES },
+ { "single-line", 0, 0, '1' },
+ { "singleline", 0, 0, '1' },
+ { "no-bmg-colors", 0, 0, GO_NO_BMG_COLORS },
+ { "nobmgcolors", 0, 0, GO_NO_BMG_COLORS },
+ { "bmg-colors", 0, 0, GO_BMG_COLORS },
+ { "bmgcolors", 0, 0, GO_BMG_COLORS },
+ { "no-bmg-inline", 0, 0, GO_NO_BMG_INLINE },
+ { "nobmginline", 0, 0, GO_NO_BMG_INLINE },
+ { "export", 0, 0, 'X' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "no-check", 0, 0, 'N' },
+ { "nocheck", 0, 0, 'N' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "list", 0, 0, GO_LIST },
+ { "ref", 0, 0, GO_REF },
+ { "full", 0, 0, GO_FULL },
+ { "hex", 0, 0, GO_HEX },
+ { "ct-dir", 1, 0, GO_CT_DIR },
+ { "ctdir", 1, 0, GO_CT_DIR },
+ { "ct-log", 2, 0, GO_CT_LOG },
+ { "ctlog", 2, 0, GO_CT_LOG },
+ { "allow-slots", 1, 0, GO_ALLOW_SLOTS },
+ { "allowslots", 1, 0, GO_ALLOW_SLOTS },
+ { "images", 1, 0, GO_IMAGES },
+ { "load-bmg", 1, 0, GO_LOAD_BMG },
+ { "loadbmg", 1, 0, GO_LOAD_BMG },
+ { "patch-bmg", 1, 0, GO_PATCH_BMG },
+ { "patchbmg", 1, 0, GO_PATCH_BMG },
+ { "pb", 1, 0, GO_PATCH_BMG },
+ { "macro-bmg", 1, 0, GO_MACRO_BMG },
+ { "macrobmg", 1, 0, GO_MACRO_BMG },
+ { "mb", 1, 0, GO_MACRO_BMG },
+ { "filter-bmg", 1, 0, GO_FILTER_BMG },
+ { "filterbmg", 1, 0, GO_FILTER_BMG },
+ { "fb", 1, 0, GO_FILTER_BMG },
+ { "patch-names", 0, 0, GO_PATCH_NAMES },
+ { "patchnames", 0, 0, GO_PATCH_NAMES },
+ { "order-by", 1, 0, GO_ORDER_BY },
+ { "orderby", 1, 0, GO_ORDER_BY },
+ { "order", 1, 0, GO_ORDER_BY },
+ { "order-all", 0, 0, GO_ORDER_ALL },
+ { "orderall", 0, 0, GO_ORDER_ALL },
+ { "dynamic", 0, 0, GO_DYNAMIC },
+ { "write-tracks", 1, 0, GO_WRITE_TRACKS },
+ { "writetracks", 1, 0, GO_WRITE_TRACKS },
+ { "wtracks", 1, 0, GO_WRITE_TRACKS },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,
+ /* 0x031 1 */ OPT_SINGLE_LINE,
+ /* 0x032 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e N */ OPT_NO_CHECK,
+ /* 0x04f */ 0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,
+ /* 0x058 X */ OPT_EXPORT,
+ /* 0x059 */ 0,0,0,0, 0,0,0,0, 0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_OLD_SPINY,
+ /* 0x08a */ OPT_CRS1,
+ /* 0x08b */ OPT_CHDIR,
+ /* 0x08c */ OPT_ROUND,
+ /* 0x08d */ OPT_RAW,
+ /* 0x08e */ OPT_BMG_ENCODING,
+ /* 0x08f */ OPT_BMG_INF_SIZE,
+ /* 0x090 */ OPT_BMG_MID,
+ /* 0x091 */ OPT_FORCE_ATTRIB,
+ /* 0x092 */ OPT_DEF_ATTRIB,
+ /* 0x093 */ OPT_NO_ATTRIB,
+ /* 0x094 */ OPT_X_ESCAPES,
+ /* 0x095 */ OPT_OLD_ESCAPES,
+ /* 0x096 */ OPT_NO_BMG_COLORS,
+ /* 0x097 */ OPT_BMG_COLORS,
+ /* 0x098 */ OPT_NO_BMG_INLINE,
+ /* 0x099 */ OPT_NO_ECHO,
+ /* 0x09a */ OPT_UTF_8,
+ /* 0x09b */ OPT_NO_UTF_8,
+ /* 0x09c */ OPT_FORCE,
+ /* 0x09d */ OPT_REPAIR_MAGICS,
+ /* 0x09e */ OPT_OLD,
+ /* 0x09f */ OPT_STD,
+ /* 0x0a0 */ OPT_NEW,
+ /* 0x0a1 */ OPT_EXTRACT,
+ /* 0x0a2 */ OPT_LIST,
+ /* 0x0a3 */ OPT_REF,
+ /* 0x0a4 */ OPT_FULL,
+ /* 0x0a5 */ OPT_HEX,
+ /* 0x0a6 */ OPT_CT_DIR,
+ /* 0x0a7 */ OPT_CT_LOG,
+ /* 0x0a8 */ OPT_ALLOW_SLOTS,
+ /* 0x0a9 */ OPT_IMAGES,
+ /* 0x0aa */ OPT_LOAD_BMG,
+ /* 0x0ab */ OPT_PATCH_BMG,
+ /* 0x0ac */ OPT_MACRO_BMG,
+ /* 0x0ad */ OPT_FILTER_BMG,
+ /* 0x0ae */ OPT_PATCH_NAMES,
+ /* 0x0af */ OPT_ORDER_BY,
+ /* 0x0b0 */ OPT_ORDER_ALL,
+ /* 0x0b1 */ OPT_DYNAMIC,
+ /* 0x0b2 */ OPT_WRITE_TRACKS,
+ /* 0x0b3 */ OPT_NUMBER,
+ /* 0x0b4 */ OPT_SECTIONS,
+ /* 0x0b5 */ 0,0,0,0, 0,0,0,0, 0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[46] = // cmd #1
+{
+ 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1
+};
+
+static u8 option_allowed_cmd_HELP[46] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_ARGTEST[46] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_TEST[46] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_COLORS[46] = // cmd #5
+{
+ 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_ERROR[46] = // cmd #6
+{
+ 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1
+};
+
+static u8 option_allowed_cmd_FILETYPE[46] = // cmd #7
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[46] = // cmd #8
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[46] = // cmd #9
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[46] = // cmd #10
+{
+ 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_CALCULATE[46] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_FLOAT[46] = // cmd #12
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_EXPORT[46] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_RAWDUMP[46] = // cmd #14
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_DUMP[46] = // cmd #15
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1,
+ 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_CAT[46] = // cmd #16
+{
+ 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 1,1,1,1,1, 1,0,1,1,1,
+ 1,1,1,1,0, 1,0,0,0,0, 0,0,0,0,1, 0
+};
+
+static u8 option_allowed_cmd_BMG[46] = // cmd #17
+{
+ 0,0,1,1,1, 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 1,1,1,1,1, 1,0,1,1,1,
+ 1,1,1,1,0, 1,0,0,0,0, 0,0,0,0,1, 0
+};
+
+static u8 option_allowed_cmd_TRACKS[46] = // cmd #18
+{
+ 0,0,1,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 1,1,1,1,1, 1,0,1,1,1,
+ 1,1,1,1,0, 1,0,0,0,0, 0,0,0,0,1, 0
+};
+
+static u8 option_allowed_cmd_DECODE[46] = // cmd #19
+{
+ 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 1,1,1,1,1, 1,0,1,1,1,
+ 1,1,1,1,0, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_CREATE[46] = // cmd #20
+{
+ 0,0,1,1,1, 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 1,1,0,0,0, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_PATCH[46] = // cmd #21
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,0,0, 0,0,1,1,1,
+ 1,1,1,1,0, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_OLD_SPINY,
+ OptionInfo + OPT_CRS1,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CT_DIR,
+ OptionInfo + OPT_CT_LOG,
+ OptionInfo + OPT_ALLOW_SLOTS,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_RAWDUMP[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DUMP[] =
+{
+ &option_cmd_DUMP_LONG,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_LIST,
+ OptionInfo + OPT_REF,
+ OptionInfo + OPT_FULL,
+ OptionInfo + OPT_HEX,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_WRITE_TRACKS,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_BMG[] =
+{
+ &option_cmd_BMG_BRIEF,
+ &option_cmd_BMG_LONG,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_LIST,
+ OptionInfo + OPT_REF,
+ OptionInfo + OPT_FULL,
+ OptionInfo + OPT_HEX,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ OptionInfo + OPT_WRITE_TRACKS,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TRACKS[] =
+{
+ &option_cmd_TRACKS_NO_HEADER,
+ &option_cmd_TRACKS_BRIEF,
+ &option_cmd_TRACKS_LONG,
+ OptionInfo + OPT_RAW,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_LIST,
+ OptionInfo + OPT_REF,
+ OptionInfo + OPT_FULL,
+ OptionInfo + OPT_HEX,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_WRITE_TRACKS,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_WRITE_TRACKS,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_LIST,
+ OptionInfo + OPT_REF,
+ OptionInfo + OPT_FULL,
+ OptionInfo + OPT_HEX,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CREATE[] =
+{
+ OptionInfo + OPT_WRITE_TRACKS,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_HEX,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ &option_cmd_CREATE_LONG,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_CT_DIR,
+ OptionInfo + OPT_CT_LOG,
+ OptionInfo + OPT_ALLOW_SLOTS,
+ OptionInfo + OPT_IMAGES,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_PATCH[] =
+{
+ OptionInfo + OPT_WRITE_TRACKS,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_LOAD_BMG,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+ OptionInfo + OPT_PATCH_NAMES,
+ OptionInfo + OPT_ORDER_BY,
+ OptionInfo + OPT_ORDER_ALL,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wctct",
+ 0,
+ "wctct [option]... command [option|parameter|file]...",
+ "Wiimms CT-CODE Tool : Manage the CT-CODE extension. BRRES, TEX0,"
+ " CT-CODE, CT-TEXT and LE-BIN files are accepted as input.",
+ 0,
+ 25,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wctct VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wctct HELP [--width=wd] OPT|OPTION ...\n"
+ "wctct HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wctct HELP [--width=wd] command [-b] [ignored]...\n"
+ "wctct HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wctct ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wctct TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 0,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wctct COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wctct ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wctct FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wctct FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wctct SYMBOLS",
+ "Print predefined symbols of text parser to standard output. The"
+ " CT-CODE specific symbols are included.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wctct FUNCTIONS [key]...",
+ "Print a list with all parser functions including the CT-CODE specific"
+ " functions. If one key ore more key entered, then only functions that"
+ " match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wctct CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wctct FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_RAWDUMP,
+ true,
+ false,
+ false,
+ "_RAWDUMP",
+ 0,
+ "wszst _RAWDUMP [-d|-D] destdir",
+ "This hidden command creates the destination directory and create"
+ " several files as copy of internal data.",
+ 0,
+ 2,
+ option_tab_cmd_RAWDUMP,
+ option_allowed_cmd_RAWDUMP
+ },
+
+ { CMD_DUMP,
+ false,
+ false,
+ true,
+ "D",
+ "DUMP",
+ "wctct DUMP [source]...",
+ "Print an information dump for the CT-CODE of each source file. BRRES,"
+ " TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as input.",
+ 0,
+ 8,
+ option_tab_cmd_DUMP,
+ option_allowed_cmd_DUMP
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ false,
+ "CAT",
+ 0,
+ "wctct CAT [source]...",
+ "Read the source files and print the CT-CODE part them as decoded text"
+ " files to standard output. The output of all source files is"
+ " concatenated. BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted"
+ " as input.",
+ 0,
+ 18,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_BMG,
+ false,
+ false,
+ false,
+ "BMG",
+ 0,
+ "wctct BMG [source]...",
+ "Read the source files and print a BMG message listing to standard"
+ " output. BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as"
+ " input.",
+ 0,
+ 31,
+ option_tab_cmd_BMG,
+ option_allowed_cmd_BMG
+ },
+
+ { CMD_TRACKS,
+ false,
+ false,
+ false,
+ "TRACKS",
+ 0,
+ "wctct TRACKS [source]...",
+ "Read the source files and print a track listing to standard output."
+ " BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as input.",
+ 0,
+ 20,
+ option_tab_cmd_TRACKS,
+ option_allowed_cmd_TRACKS
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wctct DECODE [source]...",
+ "Read the source files and decode them to CT-TEXT files. The default"
+ " destination is '%P/%N.txt'. BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN"
+ " are accepted as input.",
+ 0,
+ 26,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_CREATE,
+ false,
+ false,
+ false,
+ "CREATE",
+ "C",
+ "wctct CREATE keyword [source]...",
+ "Read the source files, scan the CT-CODE part and create an output"
+ " file controlled by the keyword. BRRES, TEX0, CT-CODE, CT-TEXT and"
+ " LE-BIN files are accepted as input. Possible keywords are: CUP1,"
+ " CRS1, r-MOD1, r-MOD2, r-OVR1, r-BAD1CODE, r-BAD1DATA (=r-CODE),"
+ " r-TEX0, r-BRRES, r-SZS, BMG, TRACKS, LIST, REF and FULL. 'r' defines"
+ " the region and is one of EU, RMCP, US, RMCE, JP, RMCJ, KO or RMCK.\n"
+ " The Korean support needs external CT-CODE files. Use option"
+ " --ct-dir to define at least one search path.",
+ 0,
+ 40,
+ option_tab_cmd_CREATE,
+ option_allowed_cmd_CREATE
+ },
+
+ { CMD_PATCH,
+ false,
+ false,
+ false,
+ "PATCH",
+ "P",
+ "wctct PATCH [source]...",
+ "Read each source file, find and scan the CT-CODE part and patch it."
+ " BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as input.",
+ 0,
+ 18,
+ option_tab_cmd_PATCH,
+ option_allowed_cmd_PATCH
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wctct =
+{
+ "wctct",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wctct.h b/project/src/ui/ui-wctct.h
new file mode 100644
index 0000000..4e0e4d0
--- /dev/null
+++ b/project/src/ui/ui-wctct.h
@@ -0,0 +1,505 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WCTCT_H
+#define SZS_UI_WCTCT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_RAW,
+ OPT_BMG_ENCODING,
+ OPT_BMG_INF_SIZE,
+ OPT_BMG_MID,
+ OPT_FORCE_ATTRIB,
+ OPT_DEF_ATTRIB,
+ OPT_NO_ATTRIB,
+ OPT_X_ESCAPES,
+ OPT_OLD_ESCAPES,
+ OPT_SINGLE_LINE,
+ OPT_NO_BMG_COLORS,
+ OPT_BMG_COLORS,
+ OPT_NO_BMG_INLINE,
+ OPT_EXPORT,
+ OPT_NO_PARAM,
+ OPT_NO_ECHO,
+ OPT_NO_CHECK,
+ OPT_LIST,
+ OPT_REF,
+ OPT_FULL,
+ OPT_HEX,
+ OPT_IMAGES,
+ OPT_LOAD_BMG,
+ OPT_PATCH_BMG,
+ OPT_MACRO_BMG,
+ OPT_FILTER_BMG,
+ OPT_PATCH_NAMES,
+ OPT_ORDER_BY,
+ OPT_ORDER_ALL,
+ OPT_DYNAMIC,
+ OPT_WRITE_TRACKS,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 46
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_OLD_SPINY,
+ OPT_CRS1,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+ OPT_CT_DIR,
+ OPT_CT_LOG,
+ OPT_ALLOW_SLOTS,
+
+ OPT__N_TOTAL // == 79
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_RAW = 1llu << OPT_RAW,
+// OB_BMG_ENCODING = 1llu << OPT_BMG_ENCODING,
+// OB_BMG_INF_SIZE = 1llu << OPT_BMG_INF_SIZE,
+// OB_BMG_MID = 1llu << OPT_BMG_MID,
+// OB_FORCE_ATTRIB = 1llu << OPT_FORCE_ATTRIB,
+// OB_DEF_ATTRIB = 1llu << OPT_DEF_ATTRIB,
+// OB_NO_ATTRIB = 1llu << OPT_NO_ATTRIB,
+// OB_X_ESCAPES = 1llu << OPT_X_ESCAPES,
+// OB_OLD_ESCAPES = 1llu << OPT_OLD_ESCAPES,
+// OB_SINGLE_LINE = 1llu << OPT_SINGLE_LINE,
+// OB_NO_BMG_COLORS = 1llu << OPT_NO_BMG_COLORS,
+// OB_BMG_COLORS = 1llu << OPT_BMG_COLORS,
+// OB_NO_BMG_INLINE = 1llu << OPT_NO_BMG_INLINE,
+// OB_EXPORT = 1llu << OPT_EXPORT,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_NO_CHECK = 1llu << OPT_NO_CHECK,
+// OB_LIST = 1llu << OPT_LIST,
+// OB_REF = 1llu << OPT_REF,
+// OB_FULL = 1llu << OPT_FULL,
+// OB_HEX = 1llu << OPT_HEX,
+// OB_IMAGES = 1llu << OPT_IMAGES,
+// OB_LOAD_BMG = 1llu << OPT_LOAD_BMG,
+// OB_PATCH_BMG = 1llu << OPT_PATCH_BMG,
+// OB_MACRO_BMG = 1llu << OPT_MACRO_BMG,
+// OB_FILTER_BMG = 1llu << OPT_FILTER_BMG,
+// OB_PATCH_NAMES = 1llu << OPT_PATCH_NAMES,
+// OB_ORDER_BY = 1llu << OPT_ORDER_BY,
+// OB_ORDER_ALL = 1llu << OPT_ORDER_ALL,
+// OB_DYNAMIC = 1llu << OPT_DYNAMIC,
+// OB_WRITE_TRACKS = 1llu << OPT_WRITE_TRACKS,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_DEST = OB_WRITE_TRACKS
+// | OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_PATCH = OB_LOAD_BMG
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG
+// | OB_PATCH_NAMES
+// | OB_ORDER_BY
+// | OB_ORDER_ALL,
+//
+// OB_GRP_TEXTOPT = OB_HEX
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_EXPORT,
+//
+// OB_GRP_TEXTOUT = OB_IGNORE
+// | OB_LIST
+// | OB_REF
+// | OB_FULL
+// | OB_GRP_TEXTOPT,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_RAWDUMP = OB_DEST
+// | OB_DEST2,
+//
+// OB_CMD_DUMP = OB_LONG
+// | OB_GRP_PATCH,
+//
+// OB_CMD_BMG = OB_BRIEF
+// | OB_LONG
+// | OB_GRP_TEXTOUT
+// | OB_BMG_ENCODING
+// | OB_BMG_INF_SIZE
+// | OB_BMG_MID
+// | OB_FORCE_ATTRIB
+// | OB_DEF_ATTRIB
+// | OB_NO_ATTRIB
+// | OB_X_ESCAPES
+// | OB_OLD_ESCAPES
+// | OB_SINGLE_LINE
+// | OB_NO_BMG_COLORS
+// | OB_BMG_COLORS
+// | OB_NO_BMG_INLINE
+// | OB_WRITE_TRACKS
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_PATCH,
+//
+// OB_CMD_TRACKS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG
+// | OB_RAW
+// | OB_GRP_TEXTOUT
+// | OB_WRITE_TRACKS
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_PATCH,
+//
+// OB_CMD_CAT = OB_GRP_TEXTOUT
+// | OB_WRITE_TRACKS
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_PATCH,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_PATCH,
+//
+// OB_CMD_CREATE = OB_GRP_DEST
+// | OB_IGNORE
+// | OB_GRP_TEXTOPT
+// | OB_BMG_ENCODING
+// | OB_BMG_INF_SIZE
+// | OB_BMG_MID
+// | OB_FORCE_ATTRIB
+// | OB_DEF_ATTRIB
+// | OB_NO_ATTRIB
+// | OB_X_ESCAPES
+// | OB_OLD_ESCAPES
+// | OB_SINGLE_LINE
+// | OB_NO_BMG_COLORS
+// | OB_BMG_COLORS
+// | OB_NO_BMG_INLINE
+// | OB_BRIEF
+// | OB_LONG
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_IMAGES
+// | OB_GRP_PATCH
+// | OB_DYNAMIC,
+//
+// OB_CMD_PATCH = OB_GRP_DEST
+// | OB_IGNORE
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_PATCH,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_FLOAT,
+ CMD_EXPORT,
+ CMD_RAWDUMP,
+
+ CMD_DUMP,
+ CMD_CAT,
+ CMD_BMG,
+ CMD_TRACKS,
+ CMD_DECODE,
+ CMD_CREATE,
+ CMD_PATCH,
+
+
+ CMD__N // == 22
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO_SINGLE_LINE = '1',
+
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_CHECK = 'N',
+ GO_NO_PARAM = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+ GO_EXPORT = 'X',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_OLD_SPINY,
+ GO_CRS1,
+ GO_CHDIR,
+ GO_ROUND,
+ GO_RAW,
+ GO_BMG_ENCODING,
+ GO_BMG_INF_SIZE,
+ GO_BMG_MID,
+ GO_FORCE_ATTRIB,
+ GO_DEF_ATTRIB,
+ GO_NO_ATTRIB,
+ GO_X_ESCAPES,
+ GO_OLD_ESCAPES,
+ GO_NO_BMG_COLORS,
+ GO_BMG_COLORS,
+ GO_NO_BMG_INLINE,
+ GO_NO_ECHO,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_LIST,
+ GO_REF,
+ GO_FULL,
+ GO_HEX,
+ GO_CT_DIR,
+ GO_CT_LOG,
+ GO_ALLOW_SLOTS,
+ GO_IMAGES,
+ GO_LOAD_BMG,
+ GO_PATCH_BMG,
+ GO_MACRO_BMG,
+ GO_FILTER_BMG,
+ GO_PATCH_NAMES,
+ GO_ORDER_BY,
+ GO_ORDER_ALL,
+ GO_DYNAMIC,
+ GO_WRITE_TRACKS,
+ GO_NUMBER,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wctct;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WCTCT_H
+
diff --git a/project/src/ui/ui-wimgt.c b/project/src/ui/ui-wimgt.c
new file mode 100644
index 0000000..0788b7f
--- /dev/null
+++ b/project/src/ui/ui-wimgt.c
@@ -0,0 +1,1400 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wimgt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Create smaller output."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_ALL, false, false, false, false, false, 'a', "all",
+ 0,
+ "Convert all files and not only the files with changed file or image"
+ " formats."
+ },
+
+ { OPT_MIPMAPS, false, false, false, false, false, 0, "mipmaps",
+ 0,
+ "If reading a source, scan for mipmaps and load them too. For PNG"
+ " files, files named NAME.mm#.EXT with #=1.. are searched. This is the"
+ " default. --mm is a short cut."
+ },
+
+ { OPT_NO_MIPMAPS, false, false, false, false, false, 0, "no-mipmaps",
+ 0,
+ "If reading a source, ignore mipmaps. This disables not the creation"
+ " of mipmaps (see -n-mipmaps). --no-mm is a short cut."
+ },
+
+ { OPT_N_MIPMAPS, false, false, false, false, false, 0, "n-mipmaps",
+ "num",
+ "Force the number of mipmaps. Values between 0 and 20 are allowed."
+ " Value OFF (default) disables this option. If enabled, options"
+ " --max-mipmaps and --mipmap-size are ignored. The creation of mipmaps"
+ " stops if the width or the height of the mipmap becomes 0. --n-mm is"
+ " a short cut."
+ },
+
+ { OPT_MAX_MIPMAPS, false, false, false, false, false, 0, "max-mipmaps",
+ "num",
+ "Control the automatic mipmap creation. Values between 0 and 20 are"
+ " allowed and the default is 4. The mipmap creation for an image"
+ " stops, if the set number is reached. This option is ignored, if"
+ " --n-mipmaps is enabled. --max-mm is a short cut."
+ },
+
+ { OPT_MIPMAP_SIZE, false, false, false, false, false, 0, "mipmap-size",
+ "num",
+ "Define the minimal width and minimal height of a generated mipmap."
+ " Any value >0 is allowed. The default is 8. This option is ignored,"
+ " if --n-mipmaps is enabled. --mm-size is a short cut."
+ },
+
+ { OPT_FAST_MIPMAPS, false, false, false, false, false, 0, "fast-mipmaps",
+ 0,
+ "If resizing an image, use the old fast resize algorithm (default"
+ " until v1.64a) instead of the new smart one. Both algorithms differ"
+ " only, when creating a mipmap for images with odd width or odd"
+ " height. The old algorithm is faster (factor 2-4) than the default"
+ " algorithm, but the new algorithm creates better resized images. See"
+ " https://szs.wiimm.de/doc/img/resize for details. --fast-mm is a"
+ " short cut."
+ },
+
+ { OPT_CMPR_DEFAULT, false, false, false, false, false, 0, "cmpr-default",
+ "rgb1[,rgb2]",
+ "Define 2 colors for the case, that all 16 pixels of a CMPR block are"
+ " transparent. The default is to calculate an average color of all"
+ " transparent pixels. Before v2.04 white was used.\n"
+ " 2 RGB values (hex values with 6 digits each) are expected as"
+ " parameter. If optional RGB2 is missed, a copy of RGB1 is used. As"
+ " first step, both colors are converted to RGB565 colors C1 and C2 and"
+ " sorted, so that C1<C2 (mandatory for CMPR). If C1 and C2 are"
+ " identical, the least significant bit of green is cleared for C1 and"
+ " set for C2.\n"
+ " Use parameter '0' to force black, '-1' to force white, or '-' to"
+ " reset to auto calculation."
+ },
+
+ { OPT_PRE_CONVERT, false, false, false, false, false, 0, "pre-convert",
+ 0,
+ "Convert the image before the image format for the destination file is"
+ " selected. This results in a perhaps worser graphic and is only"
+ " useful to control graphic conversions."
+ },
+
+ { OPT_PATCH, false, false, false, false, true, 'P', "patch",
+ "mode1.mode2...=file",
+ "This option specifies patch mode list and a file, separated by an"
+ " equal sign. Mode is a point separated list of the keywords: TOP (T),"
+ " BOTTOM (B), VCENTER (V), INS-TOP (IT) and INS-BOTTOM (IB) for the"
+ " vertical alignment, LEFT (L), RIGHT (R), HCENTER (H), INS-LEFT (IL)"
+ " and INS-RIGHT (IR) for the horizontal alignment, COPY (CP),"
+ " BACKGROUND (BG), FOREGROUND (FG) and MIX (MX) as color calculation"
+ " 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."
+ },
+
+ { OPT_TRANSFORM, false, false, false, false, true, 'x', "transform",
+ "list",
+ "Convert image formats. A comma separated list with terms is expected."
+ " A term have the syntax '[SRC=]DEST'. It means: convert SRC format"
+ " into DEST format. If SRC= is not set, the destination format is used"
+ " 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"
+ " 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"
+ " (import). Allowed image formats are: I4, I8, IA4, IA8, RGB565"
+ " (=R565), RGB5A3 (=R3), RGBA32 (=R32), C4, C8, C14X2, CMPR. Allowed"
+ " palette formats are: P-IA8 (=P8), P-RGB565 (=P565), P-RGB5A3 (=P3)."
+ " Attributtes are PALETTE, NO-PALETTE, GRAY, COLOR, ALPHA and"
+ " NO-ALPHA.\n"
+ " All terms are managed as list. For each graphic the list is"
+ " iterated until the first SRC tuple of a term matches the graphic."
+ " Then the destination tuple is used for the transformation.\n"
+ " The command 'wimgt TEST' prints a clearly arranged readable table"
+ " as result of this option."
+ },
+
+ { OPT_STRIP, false, false, false, false, false, 0, "strip",
+ 0,
+ "If creating a PNG file, don't add comments about creator and source"
+ " formats."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 26
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support. The optional parameter is"
+ " deprecated and ignored. See https://szs.wiimm.de/opt/lecode for"
+ " details."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, true, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, true, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 54
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_LIST_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, geometry data of the image is printed. If set twice, advanced"
+ " geometry data is printed."
+ };
+
+static const InfoOption_t option_cmd_ENCODE_ALL =
+ { OPT_ALL, false, false, false, false, false, 'a', "all",
+ 0,
+ "If source and destination file are the same, the file is only written"
+ " on modifications (transform, patch, ...). If --all is set, then the"
+ " file is always written."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_LIST, "LIST", "LS", 0 },
+ { CMD_LIST_L, "LIST-L", "LL", 0 },
+ { CMD_LIST_L, "LISTL", 0, 0 },
+ { CMD_LIST_LL, "LIST-LL", "LLL", 0 },
+ { CMD_LIST_LL, "LISTLL", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+ { CMD_CONVERT, "CONVERT", "CV", 0 },
+ { CMD_COPY, "COPY", "CP", 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHBM:T:A:td:D:E:orupiaP:x:";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "all", 0, 0, 'a' },
+ { "mipmaps", 0, 0, GO_MIPMAPS },
+ { "no-mipmaps", 0, 0, GO_NO_MIPMAPS },
+ { "nomipmaps", 0, 0, GO_NO_MIPMAPS },
+ { "no-mm", 0, 0, GO_NO_MIPMAPS },
+ { "nomm", 0, 0, GO_NO_MIPMAPS },
+ { "n-mipmaps", 1, 0, GO_N_MIPMAPS },
+ { "nmipmaps", 1, 0, GO_N_MIPMAPS },
+ { "n-mm", 1, 0, GO_N_MIPMAPS },
+ { "nmm", 1, 0, GO_N_MIPMAPS },
+ { "max-mipmaps", 1, 0, GO_MAX_MIPMAPS },
+ { "maxmipmaps", 1, 0, GO_MAX_MIPMAPS },
+ { "max-mm", 1, 0, GO_MAX_MIPMAPS },
+ { "maxmm", 1, 0, GO_MAX_MIPMAPS },
+ { "mipmap-size", 1, 0, GO_MIPMAP_SIZE },
+ { "mipmapsize", 1, 0, GO_MIPMAP_SIZE },
+ { "mm-size", 1, 0, GO_MIPMAP_SIZE },
+ { "mmsize", 1, 0, GO_MIPMAP_SIZE },
+ { "fast-mipmaps", 0, 0, GO_FAST_MIPMAPS },
+ { "fastmipmaps", 0, 0, GO_FAST_MIPMAPS },
+ { "fast-mm", 0, 0, GO_FAST_MIPMAPS },
+ { "fastmm", 0, 0, GO_FAST_MIPMAPS },
+ { "cmpr-default", 1, 0, GO_CMPR_DEFAULT },
+ { "pre-convert", 0, 0, GO_PRE_CONVERT },
+ { "preconvert", 0, 0, GO_PRE_CONVERT },
+ { "patch", 1, 0, 'P' },
+ { "transform", 1, 0, 'x' },
+ { "strip", 0, 0, GO_STRIP },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 */ 0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e */ 0,0,
+ /* 0x050 P */ OPT_PATCH,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,0,0,0, 0,0,0,0, 0,0,
+ /* 0x061 a */ OPT_ALL,
+ /* 0x062 */ 0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,
+ /* 0x078 x */ OPT_TRANSFORM,
+ /* 0x079 */ 0,0,0,0, 0,0,0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_UTF_8,
+ /* 0x08b */ OPT_NO_UTF_8,
+ /* 0x08c */ OPT_FORCE,
+ /* 0x08d */ OPT_REPAIR_MAGICS,
+ /* 0x08e */ OPT_OLD,
+ /* 0x08f */ OPT_STD,
+ /* 0x090 */ OPT_NEW,
+ /* 0x091 */ OPT_EXTRACT,
+ /* 0x092 */ OPT_NUMBER,
+ /* 0x093 */ OPT_MIPMAPS,
+ /* 0x094 */ OPT_NO_MIPMAPS,
+ /* 0x095 */ OPT_N_MIPMAPS,
+ /* 0x096 */ OPT_MAX_MIPMAPS,
+ /* 0x097 */ OPT_MIPMAP_SIZE,
+ /* 0x098 */ OPT_FAST_MIPMAPS,
+ /* 0x099 */ OPT_CMPR_DEFAULT,
+ /* 0x09a */ OPT_PRE_CONVERT,
+ /* 0x09b */ OPT_STRIP,
+ /* 0x09c */ OPT_SECTIONS,
+ /* 0x09d */ 0,0,0,
+ /* 0x0a0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0b0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[26] = // cmd #1
+{
+ 0,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1
+};
+
+static u8 option_allowed_cmd_HELP[26] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_ARGTEST[26] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_TEST[26] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_COLORS[26] = // cmd #5
+{
+ 0,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_ERROR[26] = // cmd #6
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1
+};
+
+static u8 option_allowed_cmd_FILETYPE[26] = // cmd #7
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[26] = // cmd #8
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_LIST[26] = // cmd #9
+{
+ 0,1,1,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_LIST_L[26] = // cmd #10
+{
+ 0,1,1,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_LIST_LL[26] = // cmd #11
+{
+ 0,1,1,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_DECODE[26] = // cmd #12
+{
+ 0,0,0,0,1, 1,1,1,1,1, 1,1,1,0,1, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_ENCODE[26] = // cmd #13
+{
+ 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_CONVERT[26] = // cmd #14
+{
+ 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_COPY[26] = // cmd #15
+{
+ 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST[] =
+{
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_L[] =
+{
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_LL[] =
+{
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_PRE_CONVERT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PATCH,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_ENCODE_ALL,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_PRE_CONVERT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PATCH,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CONVERT[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_ENCODE_ALL,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_PRE_CONVERT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PATCH,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COPY[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_ENCODE_ALL,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_PRE_CONVERT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PATCH,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wimgt",
+ 0,
+ "wimgt [option]... command [option|parameter|file]...",
+ "Wiimms Image Tool : Extract and convert graphic images. The file"
+ " formats TPL, TEX, BTI, BREFT and PNG are supported.",
+ 0,
+ 20,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wimgt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wimgt HELP [--width=wd] OPT|OPTION ...\n"
+ "wimgt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wimgt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wimgt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wimgt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wimgt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 0,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wimgt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wimgt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wimgt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wimgt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_LIST,
+ false,
+ false,
+ true,
+ "LIST",
+ "LS",
+ "wimgt LIST [source]...",
+ "List images files and print file and image type.",
+ 0,
+ 3,
+ option_tab_cmd_LIST,
+ option_allowed_cmd_LIST
+ },
+
+ { CMD_LIST_L,
+ false,
+ false,
+ false,
+ "LIST-L",
+ "LL",
+ "wit LIST-L [source]...",
+ "List images files and print file and image type and geometry data."
+ " 'LIST-L' is a short cut for 'LIST --long'.",
+ 0,
+ 3,
+ option_tab_cmd_LIST_L,
+ option_allowed_cmd_LIST_L
+ },
+
+ { CMD_LIST_LL,
+ false,
+ false,
+ false,
+ "LIST-LL",
+ "LLL",
+ "wit LIST-LL [source]...",
+ "List images files and print file and image type and advanced geometry"
+ " data. 'LIST-LL' is a short cut for 'LIST --long --long'.",
+ 0,
+ 3,
+ option_tab_cmd_LIST_LL,
+ option_allowed_cmd_LIST_LL
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ true,
+ "DECODE",
+ "DEC",
+ "wimgt DECODE [source]...",
+ "Decode (export) the entered image files into PNG files. The default"
+ " destination is '%P/%F.png'.",
+ 0,
+ 20,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "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).",
+ 0,
+ 21,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ { CMD_CONVERT,
+ false,
+ false,
+ false,
+ "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.",
+ 0,
+ 21,
+ option_tab_cmd_CONVERT,
+ option_allowed_cmd_CONVERT
+ },
+
+ { CMD_COPY,
+ false,
+ false,
+ false,
+ "COPY",
+ "CP",
+ "wimgt COPY source dest\n"
+ "wimgt COPY source... [-d|-D] dest",
+ "Copy and convert an image from 'source' to 'dest'. Multiple sources"
+ " can be used, if 'dest' is a directory or contains at least one"
+ " %-pattern.\n"
+ " 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.",
+ 0,
+ 21,
+ option_tab_cmd_COPY,
+ option_allowed_cmd_COPY
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wimgt =
+{
+ "wimgt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wimgt.h b/project/src/ui/ui-wimgt.h
new file mode 100644
index 0000000..5cb93b9
--- /dev/null
+++ b/project/src/ui/ui-wimgt.h
@@ -0,0 +1,348 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WIMGT_H
+#define SZS_UI_WIMGT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_ALL,
+ OPT_MIPMAPS,
+ OPT_NO_MIPMAPS,
+ OPT_N_MIPMAPS,
+ OPT_MAX_MIPMAPS,
+ OPT_MIPMAP_SIZE,
+ OPT_FAST_MIPMAPS,
+ OPT_CMPR_DEFAULT,
+ OPT_PRE_CONVERT,
+ OPT_PATCH,
+ OPT_TRANSFORM,
+ OPT_STRIP,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 26
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 54
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_ALL = 1llu << OPT_ALL,
+// OB_MIPMAPS = 1llu << OPT_MIPMAPS,
+// OB_NO_MIPMAPS = 1llu << OPT_NO_MIPMAPS,
+// OB_N_MIPMAPS = 1llu << OPT_N_MIPMAPS,
+// OB_MAX_MIPMAPS = 1llu << OPT_MAX_MIPMAPS,
+// OB_MIPMAP_SIZE = 1llu << OPT_MIPMAP_SIZE,
+// OB_FAST_MIPMAPS = 1llu << OPT_FAST_MIPMAPS,
+// OB_CMPR_DEFAULT = 1llu << OPT_CMPR_DEFAULT,
+// OB_PRE_CONVERT = 1llu << OPT_PRE_CONVERT,
+// OB_PATCH = 1llu << OPT_PATCH,
+// OB_TRANSFORM = 1llu << OPT_TRANSFORM,
+// OB_STRIP = 1llu << OPT_STRIP,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_TRANSFORM = OB_N_MIPMAPS
+// | OB_MAX_MIPMAPS
+// | OB_MIPMAP_SIZE
+// | OB_PRE_CONVERT
+// | OB_PATCH
+// | OB_MIPMAPS
+// | OB_NO_MIPMAPS
+// | OB_FAST_MIPMAPS
+// | OB_CMPR_DEFAULT
+// | OB_TRANSFORM
+// | OB_STRIP,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_LIST = OB_LONG
+// | OB_NO_HEADER
+// | OB_IGNORE,
+//
+// OB_CMD_LIST_L = OB_CMD_LIST,
+//
+// OB_CMD_LIST_LL = OB_CMD_LIST_L,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_ENCODE = OB_GRP_DEST
+// | OB_IGNORE
+// | OB_ALL
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_CONVERT = OB_CMD_ENCODE,
+//
+// OB_CMD_COPY = OB_CMD_ENCODE,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+
+ CMD_LIST,
+ CMD_LIST_L,
+ CMD_LIST_LL,
+
+ CMD_DECODE,
+ CMD_ENCODE,
+ CMD_CONVERT,
+ CMD_COPY,
+
+
+ CMD__N // == 16
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_PATCH = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+
+ GO_ALL = 'a',
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+ GO_TRANSFORM = 'x',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_MIPMAPS,
+ GO_NO_MIPMAPS,
+ GO_N_MIPMAPS,
+ GO_MAX_MIPMAPS,
+ GO_MIPMAP_SIZE,
+ GO_FAST_MIPMAPS,
+ GO_CMPR_DEFAULT,
+ GO_PRE_CONVERT,
+ GO_STRIP,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wimgt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WIMGT_H
+
diff --git a/project/src/ui/ui-wkclt.c b/project/src/ui/ui-wkclt.c
new file mode 100644
index 0000000..6678074
--- /dev/null
+++ b/project/src/ui/ui-wkclt.c
@@ -0,0 +1,2482 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wkclt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_SCALE, false, false, false, false, false, 0, "scale",
+ "vector[@origin]",
+ "Transform the data: Scale all coordinates and size values by 'vector'"
+ " relative to the point 'origin'. If the origin is not set, 0,0,0 is"
+ " used instead.\n"
+ " Negative values mirror the coordinates. Each parameter is either a"
+ " vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_SHIFT, false, false, false, false, false, 0, "shift",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --translate, but the addition is done before rotation. The parameter"
+ " is either a vector expression or a comma separated expression list"
+ " of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_XSS, false, false, false, false, false, 0, "xss",
+ "x1old,x1new,x2old,x2new",
+ "--xss (x-scale-shift) calculates the X values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_YSS, false, false, false, false, false, 0, "yss",
+ "y1old,y1new,y2old,y2new",
+ "--yss (y-scale-shift) calculates the Y values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ZSS, false, false, false, false, false, 0, "zss",
+ "z1old,z1new,z2old,z2new",
+ "--zss (z-scale-shift) calculates the Z values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ROT, false, false, false, false, false, 0, "rot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes"
+ " through the point 'origin'. If the origin is not set, 0,0,0 is used"
+ " instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y,z').\n"
+ " Option --rot is an alternative for --xrot, --yrot and --zrot to"
+ " define all 3 rotations in one step. Transformations are calculated"
+ " in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_XROT, false, false, false, false, false, 0, "xrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('y,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_YROT, false, false, false, false, false, 0, "yrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead. This is a"
+ " horizontal counterclockwise rotation and the old option name --hrot"
+ " can also used.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_ZROT, false, false, false, false, false, 0, "zrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the z-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_TRANSLATE, false, false, false, false, false, 0, "translate",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --shift, but the addition is done after rotation. The parameter is"
+ " either a vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z'). --trans is a short cut.\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_NULL, false, false, false, false, false, 0, "null",
+ 0,
+ "Create a neutral transformation without affecting the coordinates."
+ " The only influence is, that the dependent values (like maximum) are"
+ " re-calculated as if a transformation has taken place."
+ },
+
+ { OPT_NEXT, false, false, false, false, false, 0, "next",
+ 0,
+ "Close the current transformation step with all scaling, shifting,"
+ " rotation and translation options and open a new step with cleared"
+ " options. On transformation each step is logical done one by one. In"
+ " real, one total transformation matrix is calculated and used for"
+ " fast transformations.\n"
+ " If option --next is used, the ability for modifying the scale and"
+ " rotation vectors (not the positions) of different KMP sections is"
+ " nearly always lost. A warning is printed if this occurs."
+ },
+
+ { OPT_ASCALE, false, false, false, false, false, 0, "ascale",
+ "factor@dir",
+ "Transform the data and do an axis scale: Close the current"
+ " transformation step like --next and scale the data by 'factor' into"
+ " the direction given by the vector 'dir'. Store the resulting matrix"
+ " as single transformation step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_AROT, false, false, false, false, false, 0, "arot",
+ "degree[@pos1]@pos2",
+ "Transform the data and do an axis rotation: Close the current"
+ " transformation step like --next and rotate the data by 'degree'"
+ " around the axis defined by the 2 points. If 'pos1' is not set, use"
+ " 0,0,0 instead. Store the resulting matrix as single transformation"
+ " step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_TFORM_SCRIPT, false, false, false, false, false, 0, "tform-script",
+ "script",
+ "Load the script and execute it by the text parser.\n"
+ " Then for each coordinate (2D and 3D), call the macro TRANSFORM after"
+ " all other transformations. Call it without parameters and set"
+ " variable $I with a zero based index of all vertices, variable $D to"
+ " the dimension (2 or 3) and the variable $P to the vector of the"
+ " current vertex. If the macro returns a vector, it is the new"
+ " position.\n"
+ " For each file, macro BEGIN is called at the beginning and END after"
+ " processing all points, but only, if the macros are defined. For END,"
+ " variable $I is set to the number of processed vertices in the"
+ " current file.\n"
+ " Before each macro call, the private and local variables are cleared"
+ " and only global parameters are permanent. The zero based index is"
+ " cleared for each new source. The parameters of the macro calls are"
+ " defined in the local name space."
+ },
+
+ { OPT_KCL_FLAG, false, false, false, false, false, 0, "kcl-flag",
+ "joblist",
+ "Modify the KCL flag of KCL files. A comma separated job list in the"
+ " format 'srclist=dest' is expected. 'srclist' is a plus sign"
+ " separated list with single values like <val>, T<type> and"
+ " <val>/<mask> or ranges like <val>:<val>, T<type>:<type> and"
+ " <val>:<val>/<mask>. '<val>' is a complete KCL flag in the range of"
+ " 0..0xffff. '<type>' are only the base types in the range of 0..0x1f."
+ " If <mask> is present, it marks the relevant bits. For the T<type>"
+ " variant, the mask is set to 0x1f.\n"
+ " All KCL flags of the source list are assigned to the new value"
+ " 'dest', but only the set bits of '<mask>' are modified. A later"
+ " definition overrides the previous one. See"
+ " https://szs.wiimm.de/opt/kcl-flag for details."
+ },
+
+ { OPT_KCL_SCRIPT, false, false, false, false, false, 0, "kcl-script",
+ "script",
+ "After reading a KCL source file and executing all transformations,"
+ " the text file 'script' is executed by the internal text parser. The"
+ " script should use the parser functions tri$*() to read and modify"
+ " the triangle positions and flags, or to add or remove complete"
+ " triangles.\n"
+ " If this option is used multiple times, each script is executed in"
+ " the entered order. See https://szs.wiimm.de/opt/kcl-script for"
+ " details."
+ },
+
+ { OPT_FLAG_FILE, false, false, false, false, false, 0, "flag-file",
+ "filename",
+ "Define a flag file if scanning an OBJ file (KCL processing). The file"
+ " name may contain %-escapes. Set it to an empty string to disable"
+ " flag files at all.\n"
+ " The tool search the flag file in the following order until found:"
+ " File defined by --flag-file; OBJ file name with replaced extension"
+ " ('a.obj' becomes 'a.flag'); OBJ file name with appended extension"
+ " ('a.obj' becomes 'a.obj.flag'). See"
+ " https://szs.wiimm.de/opt/flag-file for details."
+ },
+
+ { OPT_SLOT, false, false, false, false, false, 0, "slot",
+ "keyword",
+ "Patch a track file to run at the specified slot. KMP and KCL may be"
+ " modified. BRRES files may be added to or removed from SZS. The main"
+ " keywords are DAISY, DESERT, SHERBET, SHYGUY, STANDARD and MOST. Slot"
+ " numbers (except '42' and '4.2') and different other track names are"
+ " also accepted. For some conversions, the auto-add library is needed."
+ " See https://szs.wiimm.de/opt/slot for details."
+ },
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Create smaller output."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Do not make plausibility checks for KCL files."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 37
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support. The optional parameter is"
+ " deprecated and ignored. See https://szs.wiimm.de/opt/lecode for"
+ " details."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_KCL, false, false, false, false, false, 0, "kcl",
+ "list",
+ "Set global options for KCL processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " Keywords SMALL, MEDIUM and CHARY select the default parameters for"
+ " the octree creation. The other allowed keywords are: FAST, NEW,"
+ " CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP, G, USEMTL,"
+ " CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED, DROP-FIXED,"
+ " DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL, CONV-FACEUP,"
+ " WEAK-WALLS, SORT, INPLACE, SILENT and LOG. See"
+ " https://szs.wiimm.de/opt/kcl for details."
+ },
+
+ { OPT_TRI_AREA, false, false, false, false, false, 0, "tri-area",
+ "EXPR",
+ "Define the minimal area size of KCL triangles. The intention is to"
+ " ignore triangles that are generally to small. EXPR is a floating"
+ " point number or expression. Triangles are invalidated if their area"
+ " size is smaller than EXPR. The test is executed after reading files,"
+ " after transformations, and after calculating normals and lengths."
+ " Values between 0.01 and 4.0 are recommended. The careful value 1.0"
+ " is used as default. Value 0 disables this filter functionality."
+ },
+
+ { OPT_TRI_HEIGHT, false, false, false, false, false, 0, "tri-height",
+ "EXPR",
+ "Define the minimal height of KCL triangles. The intention is to"
+ " ignore deformed triangles (very slim, but long). EXPR is a floating"
+ " point number or expression. Triangles are invalidated if at least 1"
+ " of the 3 heights is smaller than EXPR. The test is executed after"
+ " reading files, after transformations, and after calculating normals"
+ " and lengths. Values between 0.01 and 2.0 are recommended. The"
+ " careful value 1.0 is used as default. Value 0 disables this filter"
+ " functionality.\n"
+ " --tri-ht is an alternative name for the option."
+ },
+
+ { OPT_XTRIDATA, true, true, false, false, false, 0, "xtridata",
+ "[=level]",
+ "Enable extended KCL triangles tests. The default level is 1."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, true, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, true, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_TINY, false, false, false, false, false, 0, "tiny",
+ "mode",
+ "Set tiny mode to a level between 0 and 7. See"
+ " https://szs.wiimm.de/opt/tiny for details."
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 70
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOUT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in KCL text files."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_TEST_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Print the matrices of transformations."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set once, suppress vector dumps for transformation steps and"
+ " ignore option --long. If set twice, suppress vector dump for final"
+ " transformation too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set once, print inverse matrix for the final transformation. If"
+ " set twice, print inverse matrix for all transformations."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Option --quiet is dedicated to automatic tests comparing the old and"
+ " new transformation algorithms. If set once, the tables are only"
+ " printed, if the results differ. If set twice, nothing is printed at"
+ " all and only the exit status will inform about the results."
+ };
+
+static const InfoOption_t option_cmd_CFF_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Force usage of 'f(typ,variant)'. If set twice, force usage of"
+ " 'a(typ,w,x,y,z)'."
+ };
+
+static const InfoOption_t option_cmd_CFF_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the comments with the alternative expression formats."
+ };
+
+static const InfoOption_t option_cmd_FLAGS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of detailed flag list and print only the type"
+ " summary."
+ };
+
+static const InfoOption_t option_cmd_DUMP_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the triangle list and print only the header"
+ " data and statistics."
+ };
+
+static const InfoOption_t option_cmd_DUMP_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, append an octree dump to the output. If set twice, add a"
+ " triangle usage list behind the octree dump."
+ };
+
+static const InfoOption_t option_cmd_TRIANGLES_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the 'normals' data."
+ };
+
+static const InfoOption_t option_cmd_TRIANGLES_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "For each occurrence of option --long increase the precision of the"
+ " floating points numbers by adding 1 fractional digit, but only up to"
+ " additionally 5 digits."
+ };
+
+static const InfoOption_t option_cmd_TRAVERSE_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print the 0-based triangle index instead of the triangle coordinates."
+ };
+
+static const InfoOption_t option_cmd_TRAVERSE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, print a calculation log. If set twice, print a calculation"
+ " log for each octree traversing step."
+ };
+
+static const InfoOption_t option_cmd_FALL_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the height (y coordinate) of the result."
+ };
+
+static const InfoOption_t option_cmd_FALL_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, print a calculation log. If set twice, be more verbose."
+ };
+
+static const InfoOption_t option_cmd_CHECK_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only warnings and suppress hints."
+ };
+
+static const InfoOption_t option_cmd_CHECK_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Be verbose and print more statistics."
+ };
+
+static const InfoOption_t option_cmd_CHECK_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet until the first warning or hint is found."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_MATRIX, "MATRIX", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+ { CMD_COPY, "COPY", "CP", 0 },
+ { CMD_CFF, "CFF", 0, 0 },
+ { CMD_FLAGS, "FLAGS", "F", 0 },
+ { CMD_DUMP, "DUMP", "D", 0 },
+ { CMD_DBRIEF, "DBRIEF", "DB", 0 },
+ { CMD_LIST, "LIST", 0, 0 },
+ { CMD_TRIANGLES, "TRIANGLES", 0, 0 },
+ { CMD_TRAVERSE, "TRAVERSE", 0, 0 },
+ { CMD_FALL, "FALL", 0, 0 },
+ { CMD_CHECK, "CHECK", "CHK", 0 },
+ { CMD_ANALYZE, "ANALYZE", 0, 0 },
+ { CMD_BLOW, "BLOW", 0, 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHBPNM:T:A:td:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "scale", 1, 0, GO_SCALE },
+ { "shift", 1, 0, GO_SHIFT },
+ { "xss", 1, 0, GO_XSS },
+ { "yss", 1, 0, GO_YSS },
+ { "zss", 1, 0, GO_ZSS },
+ { "rot", 1, 0, GO_ROT },
+ { "xrot", 1, 0, GO_XROT },
+ { "yrot", 1, 0, GO_YROT },
+ { "hrot", 1, 0, GO_YROT },
+ { "zrot", 1, 0, GO_ZROT },
+ { "translate", 1, 0, GO_TRANSLATE },
+ { "null", 0, 0, GO_NULL },
+ { "next", 0, 0, GO_NEXT },
+ { "ascale", 1, 0, GO_ASCALE },
+ { "arot", 1, 0, GO_AROT },
+ { "tform-script", 1, 0, GO_TFORM_SCRIPT },
+ { "tformscript", 1, 0, GO_TFORM_SCRIPT },
+ { "kcl", 1, 0, GO_KCL },
+ { "kcl-flag", 1, 0, GO_KCL_FLAG },
+ { "kclflag", 1, 0, GO_KCL_FLAG },
+ { "kcl-script", 1, 0, GO_KCL_SCRIPT },
+ { "kclscript", 1, 0, GO_KCL_SCRIPT },
+ { "tri-area", 1, 0, GO_TRI_AREA },
+ { "triarea", 1, 0, GO_TRI_AREA },
+ { "tri-height", 1, 0, GO_TRI_HEIGHT },
+ { "triheight", 1, 0, GO_TRI_HEIGHT },
+ { "tri-ht", 1, 0, GO_TRI_HEIGHT },
+ { "triht", 1, 0, GO_TRI_HEIGHT },
+ { "kcl-min", 1, 0, GO_TRI_HEIGHT },
+ { "kclmin", 1, 0, GO_TRI_HEIGHT },
+ { "flag-file", 1, 0, GO_FLAG_FILE },
+ { "flagfile", 1, 0, GO_FLAG_FILE },
+ { "xtridata", 2, 0, GO_XTRIDATA },
+ { "xtri", 2, 0, GO_XTRIDATA },
+ { "slot", 1, 0, GO_SLOT },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "no-check", 0, 0, 'N' },
+ { "nocheck", 0, 0, 'N' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "tiny", 1, 0, GO_TINY },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 */ 0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e N */ OPT_NO_CHECK,
+ /* 0x04f */ 0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_SCALE,
+ /* 0x08b */ OPT_SHIFT,
+ /* 0x08c */ OPT_XSS,
+ /* 0x08d */ OPT_YSS,
+ /* 0x08e */ OPT_ZSS,
+ /* 0x08f */ OPT_ROT,
+ /* 0x090 */ OPT_XROT,
+ /* 0x091 */ OPT_YROT,
+ /* 0x092 */ OPT_ZROT,
+ /* 0x093 */ OPT_TRANSLATE,
+ /* 0x094 */ OPT_NULL,
+ /* 0x095 */ OPT_NEXT,
+ /* 0x096 */ OPT_ASCALE,
+ /* 0x097 */ OPT_AROT,
+ /* 0x098 */ OPT_TFORM_SCRIPT,
+ /* 0x099 */ OPT_KCL,
+ /* 0x09a */ OPT_KCL_FLAG,
+ /* 0x09b */ OPT_KCL_SCRIPT,
+ /* 0x09c */ OPT_TRI_AREA,
+ /* 0x09d */ OPT_TRI_HEIGHT,
+ /* 0x09e */ OPT_FLAG_FILE,
+ /* 0x09f */ OPT_XTRIDATA,
+ /* 0x0a0 */ OPT_SLOT,
+ /* 0x0a1 */ OPT_ROUND,
+ /* 0x0a2 */ OPT_NO_ECHO,
+ /* 0x0a3 */ OPT_UTF_8,
+ /* 0x0a4 */ OPT_NO_UTF_8,
+ /* 0x0a5 */ OPT_FORCE,
+ /* 0x0a6 */ OPT_REPAIR_MAGICS,
+ /* 0x0a7 */ OPT_TINY,
+ /* 0x0a8 */ OPT_OLD,
+ /* 0x0a9 */ OPT_STD,
+ /* 0x0aa */ OPT_NEW,
+ /* 0x0ab */ OPT_EXTRACT,
+ /* 0x0ac */ OPT_NUMBER,
+ /* 0x0ad */ OPT_SECTIONS,
+ /* 0x0ae */ 0,0,
+ /* 0x0b0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[37] = // cmd #1
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1
+};
+
+static u8 option_allowed_cmd_HELP[37] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1
+};
+
+static u8 option_allowed_cmd_ARGTEST[37] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1
+};
+
+static u8 option_allowed_cmd_TEST[37] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1
+};
+
+static u8 option_allowed_cmd_COLORS[37] = // cmd #5
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_ERROR[37] = // cmd #6
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1
+};
+
+static u8 option_allowed_cmd_FILETYPE[37] = // cmd #7
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[37] = // cmd #8
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[37] = // cmd #9
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[37] = // cmd #10
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_CALCULATE[37] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_MATRIX[37] = // cmd #12
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_FLOAT[37] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_EXPORT[37] = // cmd #14
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0
+};
+
+static u8 option_allowed_cmd_CAT[37] = // cmd #15
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,0, 1,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_DECODE[37] = // cmd #16
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,0, 1,1,1,1,1,
+ 1,1,1,1,1, 1,0
+};
+
+static u8 option_allowed_cmd_ENCODE[37] = // cmd #17
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,0, 1,1,1,1,1,
+ 1,1,1,1,1, 1,0
+};
+
+static u8 option_allowed_cmd_COPY[37] = // cmd #18
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,0, 1,1,1,1,1,
+ 1,1,1,1,1, 1,0
+};
+
+static u8 option_allowed_cmd_CFF[37] = // cmd #19
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,1,0,1,0, 1,1,1,1,1,
+ 1,1,1,1,1, 1,0
+};
+
+static u8 option_allowed_cmd_FLAGS[37] = // cmd #20
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,1,1,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_DUMP[37] = // cmd #21
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,0,1,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_DBRIEF[37] = // cmd #22
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,0,1,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_LIST[37] = // cmd #23
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_TRIANGLES[37] = // cmd #24
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,0,1,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_TRAVERSE[37] = // cmd #25
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,0,1,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_FALL[37] = // cmd #26
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,0,1,0, 0,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_CHECK[37] = // cmd #27
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,1,0, 1,1,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_ANALYZE[37] = // cmd #28
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+static u8 option_allowed_cmd_BLOW[37] = // cmd #29
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 1,0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+ OptionInfo + OPT_TINY,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+ &option_cmd_TEST_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MATRIX[] =
+{
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_MATRIX_BRIEF,
+ &option_cmd_MATRIX_LONG,
+ &option_cmd_MATRIX_QUIET,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COPY[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CFF[] =
+{
+ &option_cmd_CFF_LONG,
+ &option_cmd_CFF_BRIEF,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_FLAG_FILE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLAGS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_FLAGS_BRIEF,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DUMP[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+ &option_cmd_DUMP_BRIEF,
+ &option_cmd_DUMP_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DBRIEF[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+ &option_cmd_DUMP_BRIEF,
+ &option_cmd_DUMP_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TRIANGLES[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+ &option_cmd_TRIANGLES_BRIEF,
+ &option_cmd_TRIANGLES_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TRAVERSE[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+ &option_cmd_TRAVERSE_BRIEF,
+ &option_cmd_TRAVERSE_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FALL[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_CHECK,
+ &option_cmd_FALL_BRIEF,
+ &option_cmd_FALL_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CHECK[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_CHECK_BRIEF,
+ &option_cmd_CHECK_LONG,
+ &option_cmd_CHECK_QUIET,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ANALYZE[] =
+{
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_FLAG_FILE,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_BLOW[] =
+{
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wkclt",
+ 0,
+ "wkclt [option]... command [option|parameter|file]...",
+ "Wiimms KCL Tool : Analyze, modify, export and create KCL and OBJ"
+ " files.",
+ 0,
+ 24,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wkclt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wkclt HELP [--width=wd] OPT|OPTION ...\n"
+ "wkclt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wkclt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wkclt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wkclt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wkclt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 1,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wkclt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wkclt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wkclt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wkclt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wkclt SYMBOLS",
+ "Print predefined symbols of text parser to standard output. The KCL"
+ " specific symbols are included.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wkclt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the KCL specific"
+ " functions. If one key ore more key entered, then only functions that"
+ " match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wkclt CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_MATRIX,
+ false,
+ false,
+ false,
+ "MATRIX",
+ 0,
+ "wkclt MATRIX [patch-option]... [vector]...",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results.",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results. The transformations are done with 4"
+ " different methods to confirm the algorithms. Only the main results"
+ " and results, which differ, are printed.\n"
+ " Normally, the exit status is OK (null). If at least one old"
+ " transformation returns different results for the different"
+ " algorithms, then status DIFFER (not null) is returned.",
+ 26,
+ option_tab_cmd_MATRIX,
+ option_allowed_cmd_MATRIX
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wkclt FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wkclt _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ true,
+ "CAT",
+ 0,
+ "wkclt CAT source...",
+ "Read the entered KCL and OBJ files and print them as OBJ files to"
+ " standard output. The output of all source files is concatenated.\n"
+ " Automated dropping of bad KCL triangles is enabled if no other drop"
+ " option is specified by option --kcl.",
+ 0,
+ 26,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wkclt DECODE source...",
+ "Read the entered KCL and OBJ files and export them to OBJ files. The"
+ " default destination is '%P/%N.txt'.\n"
+ " Automated dropping of bad KCL triangles is enabled if no other drop"
+ " option is specified by option --kcl.",
+ 0,
+ 34,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "ENCODE",
+ "ENC",
+ "wkclt ENCODE source...",
+ "Read the entered KCL and OBJ files and encode (compile) them to"
+ " binary KCL files. The default destination is '%P/%N.kcl'.\n"
+ " See https://szs.wiimm.de/doc/kcl for encoding details.",
+ 0,
+ 34,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ { CMD_COPY,
+ false,
+ false,
+ false,
+ "COPY",
+ "CP",
+ "wkclt COPY source dest\n"
+ "wkclt COPY source... [-d|-D] dest",
+ "Copy and convert a collision file from 'source' to 'dest'. Multiple"
+ " KCL and OBJ sources can be used, if 'dest' is a directory or"
+ " contains at least one %-pattern.\n"
+ " This is an alternative for the DECODE and ENCODE commands. The"
+ " default destination file format is selected by scanning the file"
+ " extension of the destination. Is it '.kcl', a binary KCL file is"
+ " created. Is it '.txt' or '.obj', an OBJ file is created. Otherwise"
+ " the output format is the same as the source.\n"
+ " Automated dropping of bad KCL triangles is enabled if no other drop"
+ " option is specified and the destination is an OBJ file.",
+ 0,
+ 34,
+ option_tab_cmd_COPY,
+ option_allowed_cmd_COPY
+ },
+
+ { CMD_CFF,
+ false,
+ false,
+ false,
+ "CFF",
+ 0,
+ "wkclt CFF source...",
+ "CFF is an abbreviation of 'create flag file' and will create a flag"
+ " file template for each entered source file. If the flag file already"
+ " exists, only missing group names are added at the end of file.",
+ 0,
+ 15,
+ option_tab_cmd_CFF,
+ option_allowed_cmd_CFF
+ },
+
+ { CMD_FLAGS,
+ false,
+ false,
+ false,
+ "FLAGS",
+ "F",
+ "wkclt FLAGS source...",
+ "Print a KCL type and flag usage statistic for each source to standard"
+ " output.",
+ 0,
+ 27,
+ option_tab_cmd_FLAGS,
+ option_allowed_cmd_FLAGS
+ },
+
+ { CMD_DUMP,
+ false,
+ false,
+ false,
+ "DUMP",
+ "D",
+ "wkclt DUMP source...",
+ "This debugging command prints an information dump about the internal"
+ " triangle data base and the octree in human and machine readable text"
+ " format. The output of all source files is concatenated and printed"
+ " to standard output.",
+ 0,
+ 27,
+ option_tab_cmd_DUMP,
+ option_allowed_cmd_DUMP
+ },
+
+ { CMD_DBRIEF,
+ false,
+ false,
+ false,
+ "DBRIEF",
+ "DB",
+ "wkclt DBRIEF source...",
+ "Command DBRIEF is a short cut for 'DUMP --brief'. The output of the"
+ " triangle list is suppressed and only the header data and statistics"
+ " are printed.",
+ 0,
+ 27,
+ option_tab_cmd_DBRIEF,
+ option_allowed_cmd_DBRIEF
+ },
+
+ { CMD_LIST,
+ false,
+ false,
+ false,
+ "LIST",
+ 0,
+ "wkclt LIST source...",
+ "This debugging command prints a list of all triangles with metrics in"
+ " human and machine readable text format. It is like DUMP, but reduced"
+ " to the list of triangles. The output of all source files is"
+ " concatenated and printed to standard output.",
+ 0,
+ 25,
+ option_tab_cmd_LIST,
+ option_allowed_cmd_LIST
+ },
+
+ { CMD_TRIANGLES,
+ false,
+ false,
+ false,
+ "TRIANGLES",
+ 0,
+ "wkclt TRIANGLES source...",
+ "This debugging commands prints one data line for each triangle. The"
+ " goal is to compare data. Therefor and to create smaller lines the"
+ " precision of the floating points numbers is reduced.\n"
+ " The print order is: flag used length | 3 points | 4 normals. For"
+ " each point and normal 3 coordinates are printed.",
+ 0,
+ 27,
+ option_tab_cmd_TRIANGLES,
+ option_allowed_cmd_TRIANGLES
+ },
+
+ { CMD_TRAVERSE,
+ false,
+ false,
+ false,
+ "TRAVERSE",
+ 0,
+ "wkclt TRAVERSE source point...",
+ "For each point, the octree of the source file is traversed to find"
+ " and print the related triangles. A point is either a comma separated"
+ " list with 3 parser expressions (one for each coordinate) or a vector"
+ " expression.",
+ 0,
+ 27,
+ option_tab_cmd_TRAVERSE,
+ option_allowed_cmd_TRAVERSE
+ },
+
+ { CMD_FALL,
+ false,
+ false,
+ false,
+ "FALL",
+ 0,
+ "wkclt FALL source point...",
+ "For each entered point, the lowest point is searched, that can be"
+ " reached without collision. The point is expanded to a cube with edge"
+ " length of 100.0 for the collision tests.",
+ 0,
+ 27,
+ option_tab_cmd_FALL,
+ option_allowed_cmd_FALL
+ },
+
+ { CMD_CHECK,
+ false,
+ false,
+ false,
+ "CHECK",
+ "CHK",
+ "wkclt CHECK source...",
+ "Read the entered KCL files (text or binary) and and make a"
+ " plausibility check. Hints and warnings are written to standard"
+ " output. The exit status is 'DIFFER' if at least one KMP warning"
+ " found.",
+ 0,
+ 8,
+ option_tab_cmd_CHECK,
+ option_allowed_cmd_CHECK
+ },
+
+ { CMD_ANALYZE,
+ true,
+ false,
+ false,
+ "ANALYZE",
+ 0,
+ "wkclt ANALYZE source...",
+ "Analyze some KCL data.",
+ 0,
+ 24,
+ option_tab_cmd_ANALYZE,
+ option_allowed_cmd_ANALYZE
+ },
+
+ { CMD_BLOW,
+ false,
+ false,
+ false,
+ "BLOW",
+ 0,
+ "wkclt BLOW source...",
+ "Try to calculate the used blow size (KCL_BLOW) of a KCL. Print one"
+ " line for each source file.",
+ 0,
+ 1,
+ option_tab_cmd_BLOW,
+ option_allowed_cmd_BLOW
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wkclt =
+{
+ "wkclt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wkclt.h b/project/src/ui/ui-wkclt.h
new file mode 100644
index 0000000..a55da8b
--- /dev/null
+++ b/project/src/ui/ui-wkclt.h
@@ -0,0 +1,481 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WKCLT_H
+#define SZS_UI_WKCLT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_SCALE,
+ OPT_SHIFT,
+ OPT_XSS,
+ OPT_YSS,
+ OPT_ZSS,
+ OPT_ROT,
+ OPT_XROT,
+ OPT_YROT,
+ OPT_ZROT,
+ OPT_TRANSLATE,
+ OPT_NULL,
+ OPT_NEXT,
+ OPT_ASCALE,
+ OPT_AROT,
+ OPT_TFORM_SCRIPT,
+ OPT_KCL_FLAG,
+ OPT_KCL_SCRIPT,
+ OPT_FLAG_FILE,
+ OPT_SLOT,
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_NO_PARAM,
+ OPT_NO_ECHO,
+ OPT_NO_CHECK,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 37
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_KCL,
+ OPT_TRI_AREA,
+ OPT_TRI_HEIGHT,
+ OPT_XTRIDATA,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_TINY,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 70
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_SCALE = 1llu << OPT_SCALE,
+// OB_SHIFT = 1llu << OPT_SHIFT,
+// OB_XSS = 1llu << OPT_XSS,
+// OB_YSS = 1llu << OPT_YSS,
+// OB_ZSS = 1llu << OPT_ZSS,
+// OB_ROT = 1llu << OPT_ROT,
+// OB_XROT = 1llu << OPT_XROT,
+// OB_YROT = 1llu << OPT_YROT,
+// OB_ZROT = 1llu << OPT_ZROT,
+// OB_TRANSLATE = 1llu << OPT_TRANSLATE,
+// OB_NULL = 1llu << OPT_NULL,
+// OB_NEXT = 1llu << OPT_NEXT,
+// OB_ASCALE = 1llu << OPT_ASCALE,
+// OB_AROT = 1llu << OPT_AROT,
+// OB_TFORM_SCRIPT = 1llu << OPT_TFORM_SCRIPT,
+// OB_KCL_FLAG = 1llu << OPT_KCL_FLAG,
+// OB_KCL_SCRIPT = 1llu << OPT_KCL_SCRIPT,
+// OB_FLAG_FILE = 1llu << OPT_FLAG_FILE,
+// OB_SLOT = 1llu << OPT_SLOT,
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_NO_CHECK = 1llu << OPT_NO_CHECK,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_TRANSFORM = OB_SCALE
+// | OB_SHIFT
+// | OB_XSS
+// | OB_YSS
+// | OB_ZSS
+// | OB_ROT
+// | OB_XROT
+// | OB_YROT
+// | OB_ZROT
+// | OB_TRANSLATE
+// | OB_NULL
+// | OB_NEXT
+// | OB_ASCALE
+// | OB_AROT
+// | OB_TFORM_SCRIPT
+// | OB_KCL_FLAG
+// | OB_KCL_SCRIPT
+// | OB_FLAG_FILE
+// | OB_SLOT,
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_TEXTOUT = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_MATRIX = OB_GRP_TRANSFORM
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_CAT = OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_ENCODE = OB_CMD_DECODE,
+//
+// OB_CMD_COPY = OB_CMD_ENCODE,
+//
+// OB_CMD_CFF = OB_LONG
+// | OB_BRIEF
+// | OB_GRP_DEST
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_FLAG_FILE,
+//
+// OB_CMD_FLAGS = OB_NO_HEADER
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_BRIEF
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_DUMP = OB_IGNORE
+// | OB_NO_CHECK
+// | OB_BRIEF
+// | OB_LONG
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_DBRIEF = OB_CMD_DUMP,
+//
+// OB_CMD_LIST = OB_IGNORE
+// | OB_NO_CHECK
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_TRIANGLES = OB_IGNORE
+// | OB_NO_CHECK
+// | OB_BRIEF
+// | OB_LONG
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_TRAVERSE = OB_IGNORE
+// | OB_NO_CHECK
+// | OB_BRIEF
+// | OB_LONG
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_FALL = OB_IGNORE
+// | OB_NO_CHECK
+// | OB_BRIEF
+// | OB_LONG
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_CHECK = OB_BRIEF
+// | OB_LONG
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE,
+//
+// OB_CMD_ANALYZE = OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_BLOW = OB_IGNORE,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_MATRIX,
+ CMD_FLOAT,
+ CMD_EXPORT,
+
+ CMD_CAT,
+ CMD_DECODE,
+ CMD_ENCODE,
+ CMD_COPY,
+ CMD_CFF,
+ CMD_FLAGS,
+ CMD_DUMP,
+ CMD_DBRIEF,
+ CMD_LIST,
+ CMD_TRIANGLES,
+ CMD_TRAVERSE,
+ CMD_FALL,
+ CMD_CHECK,
+ CMD_ANALYZE,
+ CMD_BLOW,
+
+
+ CMD__N // == 30
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_CHECK = 'N',
+ GO_NO_PARAM = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_SCALE,
+ GO_SHIFT,
+ GO_XSS,
+ GO_YSS,
+ GO_ZSS,
+ GO_ROT,
+ GO_XROT,
+ GO_YROT,
+ GO_ZROT,
+ GO_TRANSLATE,
+ GO_NULL,
+ GO_NEXT,
+ GO_ASCALE,
+ GO_AROT,
+ GO_TFORM_SCRIPT,
+ GO_KCL,
+ GO_KCL_FLAG,
+ GO_KCL_SCRIPT,
+ GO_TRI_AREA,
+ GO_TRI_HEIGHT,
+ GO_FLAG_FILE,
+ GO_XTRIDATA,
+ GO_SLOT,
+ GO_ROUND,
+ GO_NO_ECHO,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_TINY,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wkclt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WKCLT_H
+
diff --git a/project/src/ui/ui-wkmpt.c b/project/src/ui/ui-wkmpt.c
new file mode 100644
index 0000000..1ce32eb
--- /dev/null
+++ b/project/src/ui/ui-wkmpt.c
@@ -0,0 +1,2661 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wkmpt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_SCALE, false, false, false, false, false, 0, "scale",
+ "vector[@origin]",
+ "Transform the data: Scale all coordinates and size values by 'vector'"
+ " relative to the point 'origin'. If the origin is not set, 0,0,0 is"
+ " used instead.\n"
+ " Negative values mirror the coordinates. Each parameter is either a"
+ " vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_SHIFT, false, false, false, false, false, 0, "shift",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --translate, but the addition is done before rotation. The parameter"
+ " is either a vector expression or a comma separated expression list"
+ " of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_XSS, false, false, false, false, false, 0, "xss",
+ "x1old,x1new,x2old,x2new",
+ "--xss (x-scale-shift) calculates the X values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_YSS, false, false, false, false, false, 0, "yss",
+ "y1old,y1new,y2old,y2new",
+ "--yss (y-scale-shift) calculates the Y values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ZSS, false, false, false, false, false, 0, "zss",
+ "z1old,z1new,z2old,z2new",
+ "--zss (z-scale-shift) calculates the Z values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ROT, false, false, false, false, false, 0, "rot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes"
+ " through the point 'origin'. If the origin is not set, 0,0,0 is used"
+ " instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y,z').\n"
+ " Option --rot is an alternative for --xrot, --yrot and --zrot to"
+ " define all 3 rotations in one step. Transformations are calculated"
+ " in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_XROT, false, false, false, false, false, 0, "xrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('y,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_YROT, false, false, false, false, false, 0, "yrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead. This is a"
+ " horizontal counterclockwise rotation and the old option name --hrot"
+ " can also used.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_ZROT, false, false, false, false, false, 0, "zrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the z-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_YPOS, false, false, false, false, false, 0, "ypos",
+ "pos",
+ "This option defines an Y position for KMP:CKPT transformations. It"
+ " has only impact to X and Z rotations (Options --xrot and --zrot). If"
+ " not set, the mean y of the active rotation origins are used."
+ },
+
+ { OPT_TRANSLATE, false, false, false, false, false, 0, "translate",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --shift, but the addition is done after rotation. The parameter is"
+ " either a vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z'). --trans is a short cut.\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_NULL, false, false, false, false, false, 0, "null",
+ 0,
+ "Create a neutral transformation without affecting the coordinates."
+ " The only influence is, that the dependent values (like maximum) are"
+ " re-calculated as if a transformation has taken place."
+ },
+
+ { OPT_NEXT, false, false, false, false, false, 0, "next",
+ 0,
+ "Close the current transformation step with all scaling, shifting,"
+ " rotation and translation options and open a new step with cleared"
+ " options. On transformation each step is logical done one by one. In"
+ " real, one total transformation matrix is calculated and used for"
+ " fast transformations.\n"
+ " If option --next is used, the ability for modifying the scale and"
+ " rotation vectors (not the positions) of different KMP sections is"
+ " nearly always lost. A warning is printed if this occurs."
+ },
+
+ { OPT_ASCALE, false, false, false, false, false, 0, "ascale",
+ "factor@dir",
+ "Transform the data and do an axis scale: Close the current"
+ " transformation step like --next and scale the data by 'factor' into"
+ " the direction given by the vector 'dir'. Store the resulting matrix"
+ " as single transformation step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_AROT, false, false, false, false, false, 0, "arot",
+ "degree[@pos1]@pos2",
+ "Transform the data and do an axis rotation: Close the current"
+ " transformation step like --next and rotate the data by 'degree'"
+ " around the axis defined by the 2 points. If 'pos1' is not set, use"
+ " 0,0,0 instead. Store the resulting matrix as single transformation"
+ " step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_TFORM_SCRIPT, false, false, false, false, false, 0, "tform-script",
+ "script",
+ "Load the script and execute it by the text parser.\n"
+ " Then for each coordinate (2D and 3D), call the macro TRANSFORM after"
+ " all other transformations. Call it without parameters and set"
+ " variable $I with a zero based index of all vertices, variable $D to"
+ " the dimension (2 or 3) and the variable $P to the vector of the"
+ " current vertex. If the macro returns a vector, it is the new"
+ " position.\n"
+ " For each file, macro BEGIN is called at the beginning and END after"
+ " processing all points, but only, if the macros are defined. For END,"
+ " variable $I is set to the number of processed vertices in the"
+ " current file.\n"
+ " Before each macro call, the private and local variables are cleared"
+ " and only global parameters are permanent. The zero based index is"
+ " cleared for each new source. The parameters of the macro calls are"
+ " defined in the local name space."
+ },
+
+ { OPT_RM_GOBJ, false, false, false, false, false, 0, "rm-gobj",
+ "objlist",
+ "Remove objects from the KMP section GOBJ. Therefor a comma separated"
+ " object list with single values like 'a' or ranges like 'a:b' is"
+ " expected. 'a' and 'b' are numbers, object names (prefixed by 'o$')"
+ " or any other parser expressions."
+ },
+
+ { OPT_SLOT, false, false, false, false, false, 0, "slot",
+ "keyword",
+ "Patch a track file to run at the specified slot. KMP and KCL may be"
+ " modified. BRRES files may be added to or removed from SZS. The main"
+ " keywords are DAISY, DESERT, SHERBET, SHYGUY, STANDARD and MOST. Slot"
+ " numbers (except '42' and '4.2') and different other track names are"
+ " also accepted. For some conversions, the auto-add library is needed."
+ " See https://szs.wiimm.de/opt/slot for details."
+ },
+
+ { OPT_DRAW, false, false, false, false, false, 'w', "draw",
+ "list",
+ "The parameter is a comma separated list of keywords to select the"
+ " elements to draw. Allowed keywords are: CKPT, CJGPT, JGPT, KTPT,"
+ " ENPT, ITPT, POTI, CNPT, ITEMBOXES, COINS, ROADOBJECTS, SOLIDOBJECTS,"
+ " DECORATION, BLACK, WHITE, KCL, NONE and ALL (default); the classes"
+ " POINTS, OBJECTS and RESPAWN; the presence-flag selectors"
+ " [1-3]OFFLINE and [1-3]ONLINE; the special options DETAILED, DISPATCH"
+ " and WARNINGS. If a keyword is prefixed by a minus sign, the option"
+ " is disabled. Option KCL decides, if the reference KCL is included in"
+ " the output. If DETAILED is disabled, an output with less faces is"
+ " created. If DISPATCH is enabled, the settings of dispatch points are"
+ " visualized. If WARNINGS is enabled, some objects are drawn in red."
+ " See https://szs.wiimm.de/opt/draw for details."
+ },
+
+ { OPT_POS_MODE, false, false, false, false, false, 0, "pos-mode",
+ "list",
+ "Define a comma separated list of modes for the next --pos-file"
+ " options. Each element of the list begins with a keyword followed by"
+ " a column index and/or a parameter list: X<col>, Y<col>, Z<col>,"
+ " D<col>, C<num>, T<num>, FA<col>=<str>, FB<col>=<str>, FC<col>=<str>,"
+ " <COLOR>\n"
+ " See https://szs.wiimm.de/opt/pos-mode for details."
+ },
+
+ { OPT_POS_FILE, false, false, false, false, false, 0, "pos-file",
+ "file",
+ "Load a position file created by mkw-ana and print the positions into"
+ " the map. Define the modes first, because the last defined modes set"
+ " by --pos-mode are used!"
+ },
+
+ { OPT_PNG, false, false, false, false, false, 0, "png",
+ "pix_size ['a' align] ['x' x1[:x2]] ['y' y1[:y2]] ['t' types]",
+ "Draw a PNG with a top view of the track instead of an OBJ file."
+ " Transformations are done after the KMP 3D drawing, but before PNG"
+ " creation.\n"
+ " 'pix_size' is the number of world units (sqare) used for 1 PNG"
+ " pixel. 'align' is a factor as anti-aliasing pixel multiplicator (>1"
+ " is on). 'x' and 'y' defines the part of the world that is displayed."
+ " If not set, the check points (KMP/CKPT) are used to find a good"
+ " area. 't' is a bit field with 32 bits to enable the the KCL types."
+ " Each bit corresponds to one of the KCL types and only . The default"
+ " is to display all but not walls and solid fall (0x7fef0bff).\n"
+ " All numeric values can be any expression allowed by the parser."
+ },
+
+ { OPT_KCL_FLAG, false, false, false, false, false, 0, "kcl-flag",
+ "joblist",
+ "Modify the KCL flag of KCL files. A comma separated job list in the"
+ " format 'srclist=dest' is expected. 'srclist' is a plus sign"
+ " separated list with single values like <val>, T<type> and"
+ " <val>/<mask> or ranges like <val>:<val>, T<type>:<type> and"
+ " <val>:<val>/<mask>. '<val>' is a complete KCL flag in the range of"
+ " 0..0xffff. '<type>' are only the base types in the range of 0..0x1f."
+ " If <mask> is present, it marks the relevant bits. For the T<type>"
+ " variant, the mask is set to 0x1f.\n"
+ " All KCL flags of the source list are assigned to the new value"
+ " 'dest', but only the set bits of '<mask>' are modified. A later"
+ " definition overrides the previous one. See"
+ " https://szs.wiimm.de/opt/kcl-flag for details."
+ },
+
+ { OPT_KCL_SCRIPT, false, false, false, false, false, 0, "kcl-script",
+ "script",
+ "After reading a KCL source file and executing all transformations,"
+ " the text file 'script' is executed by the internal text parser. The"
+ " script should use the parser functions tri$*() to read and modify"
+ " the triangle positions and flags, or to add or remove complete"
+ " triangles.\n"
+ " If this option is used multiple times, each script is executed in"
+ " the entered order. See https://szs.wiimm.de/opt/kcl-script for"
+ " details."
+ },
+
+ { OPT_FLAG_FILE, false, false, false, false, false, 0, "flag-file",
+ "filename",
+ "Define a flag file if scanning an OBJ file (KCL processing). The file"
+ " name may contain %-escapes. Set it to an empty string to disable"
+ " flag files at all.\n"
+ " The tool search the flag file in the following order until found:"
+ " File defined by --flag-file; OBJ file name with replaced extension"
+ " ('a.obj' becomes 'a.flag'); OBJ file name with appended extension"
+ " ('a.obj' becomes 'a.obj.flag'). See"
+ " https://szs.wiimm.de/opt/flag-file for details."
+ },
+
+ { OPT_REPAIR_XPF, false, false, false, false, false, 0, "repair-xpflags",
+ "file",
+ "Load a KMP file and use it to repair the settings of the extended"
+ " presence flags, if they are destroyed by another KMP tool. --repxpf"
+ " is a short cut for this option."
+ },
+
+ { OPT_GAMEMODES, false, false, false, false, false, 0, "gamemodes",
+ "list",
+ "Filter the list of combinations. The parameter is a comma separated"
+ " list of keywords: AUTO: Add a automatic mode without conditions"
+ " first. STANDARD (or STD): Add standard modes. 1STANDARD (or 1STD):"
+ " Add standard modes first. BALLOON: Add balloon battle modes. COIN:"
+ " Add coin runners modes. BATTLE: Short cut for 'BALLOON,COIN'. VERSUS"
+ " (or VS): Add versus modes. ITEMRAIN: Add itemrain modes. RACE: Short"
+ " cut for 'VERSUS,ITEMRAIN'. ALL (default): Short cut for"
+ " 'STANDARD,BATTLE,RACE'. NO-MODES: Exclude 'ALL' and create auto"
+ " modes only. ENGINE: Include engine classes (default). NO-ENGINE:"
+ " Exclude engine classes. RANDOM: Include random modes (default)."
+ " NO-RANDOM: Exclude random modes. OFFLINE: Filter offline modes."
+ " ONLINE: Filter online modes. NO-TT: Exclude time trial. TT: Force a"
+ " time trial scenario, even if it is a duplicate. FULL: Don't"
+ " eliminate duplicates from list (up to 1573 modes). NSORT: Sort the"
+ " list by name. ISORT: Sort the list by index. DEBUG: Print a debug"
+ " info about this option."
+ },
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress information lines in decoded KMP text files. This includes"
+ " syntax information (--no-header). If set twice, the output of"
+ " unneeded sections is also suppressed."
+ },
+
+ { OPT_EXPORT, false, false, false, false, false, 'X', "export",
+ 0,
+ "Enable the export mode and create small and machine readable text"
+ " files for easy post processing. The option works similar like -HBB"
+ " for KMP text files."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_EPSILON, false, false, false, false, false, 0, "epsilon",
+ "float",
+ "When comparing floating point numbers, 2 numbers are considered"
+ " identical if their difference is less than or equal to epsilon. The"
+ " default value is 0.01."
+ },
+
+ { OPT_DIFF, false, false, false, false, false, 0, "diff",
+ "list",
+ "List of KMP sections names that should be compared. To select a"
+ " section, use a combiantion of the following keywords: AREA, CAME,"
+ " CNPT, CKPH, CKPT, ENPH, ENPT, GOBJ, ITPH, ITPT, JGPT, KTPT, MSPT,"
+ " POTI, STGI, NONE, GOOD, DEFAULT of ALL (default). Additional"
+ " keywords are SORT (default) and NOSORT"
+ },
+
+ { OPT_GENERIC, false, false, false, false, false, 'G', "generic",
+ 0,
+ "Forget scanned entry names and use generic names for output."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Do not make plausibility checks for KMP files."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 49
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support. The optional parameter is"
+ " deprecated and ignored. See https://szs.wiimm.de/opt/lecode for"
+ " details."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_BATTLE, true, false, false, false, false, 0, "battle",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used.\n"
+ " If mode is ON, assume a battle arena and enable a spüecial battle"
+ " support. If mode is OFF, disable special battle arena support. If"
+ " mode is AUTO, analyse the KMP and estimate, if it is a battle"
+ " areana. Modes ON and OFF override KMP parameter BATTLE-MODE."
+ },
+
+ { OPT_EXPORT_FLAGS, true, false, false, false, false, 0, "export-flags",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used."
+ " --exflags is an alternative name for the option.\n"
+ " If mode is ON, this feature is forced: On creating a KMP text file,"
+ " the option EXPORT-FLAGS is always set to 1. On creating a binary KMP"
+ " file, the flags are always exported as lowest byte of the scale"
+ " factors or x-rotation.\n"
+ " If mode is OFF, this feature is totally disabled. If mode is not"
+ " AUTO, KMP parameter EXPORT-FLAGS is overridden."
+ },
+
+ { OPT_ROUTE_OPTIONS, true, false, false, false, false, 0, "route-options",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used.\n"
+ " On mode ON, the new commands $PREV and $NEXT are printed for each"
+ " group of KMP sections ENPT and ITPT. On mode AUTO, the command is"
+ " only printed, if any option is set or if parameter SHOW-OPTIONS is"
+ " >0. On mode OFF, this feature is totally disabled to create KMP text"
+ " files that are compatible with versions <1.60a.\n"
+ " This option exists only for a transition period. Its behaviour will"
+ " be changed in the future. --ropt is a short cut."
+ },
+
+ { OPT_WIM0, true, false, false, false, false, 0, "wim0",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used.\n"
+ " If mode is ON, a KMP section called WIM0 is added on binary KMP"
+ " creation. The sections contains information for Wiimms tools.\n"
+ " If mode is OFF, this feature is totally disabled. If mode is not"
+ " AUTO, KMP parameter KMP-WIM0 is overridden."
+ },
+
+ { OPT_LOAD_KCL, false, false, false, false, false, 0, "load-kcl",
+ "file",
+ "Load a KCL or OBJ file for reference issues."
+ },
+
+ { OPT_KCL, false, false, false, false, false, 0, "kcl",
+ "list",
+ "Set global options for KCL processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " Keywords SMALL, MEDIUM and CHARY select the default parameters for"
+ " the octree creation. The other allowed keywords are: FAST, NEW,"
+ " CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP, G, USEMTL,"
+ " CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED, DROP-FIXED,"
+ " DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL, CONV-FACEUP,"
+ " WEAK-WALLS, SORT, INPLACE, SILENT and LOG. See"
+ " https://szs.wiimm.de/opt/kcl for details."
+ },
+
+ { OPT_TRI_AREA, false, false, false, false, false, 0, "tri-area",
+ "EXPR",
+ "Define the minimal area size of KCL triangles. The intention is to"
+ " ignore triangles that are generally to small. EXPR is a floating"
+ " point number or expression. Triangles are invalidated if their area"
+ " size is smaller than EXPR. The test is executed after reading files,"
+ " after transformations, and after calculating normals and lengths."
+ " Values between 0.01 and 4.0 are recommended. The careful value 1.0"
+ " is used as default. Value 0 disables this filter functionality."
+ },
+
+ { OPT_TRI_HEIGHT, false, false, false, false, false, 0, "tri-height",
+ "EXPR",
+ "Define the minimal height of KCL triangles. The intention is to"
+ " ignore deformed triangles (very slim, but long). EXPR is a floating"
+ " point number or expression. Triangles are invalidated if at least 1"
+ " of the 3 heights is smaller than EXPR. The test is executed after"
+ " reading files, after transformations, and after calculating normals"
+ " and lengths. Values between 0.01 and 2.0 are recommended. The"
+ " careful value 1.0 is used as default. Value 0 disables this filter"
+ " functionality.\n"
+ " --tri-ht is an alternative name for the option."
+ },
+
+ { OPT_XTRIDATA, true, true, false, false, false, 0, "xtridata",
+ "[=level]",
+ "Enable extended KCL triangles tests. The default level is 1."
+ },
+
+ { OPT_KMP, false, false, false, false, false, 0, "kmp",
+ "list",
+ "Set global options for KMP processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " The other allowed keywords are: FORCE, NEW, RM-SPCITEM, LEFT, RIGHT,"
+ " WIDE, NARROW, FIX-CKPH, FIX-ENPH, FIX-ITPH, FIX-PH, FIX-CKNEXT,"
+ " FIX-CKJGPT, FIX-CK, FIX-ALL, MASK-PFLAGS, RM-LECODE, PURGE-GOBJ,"
+ " FULL-DEFOBJ, DUMP-CLASS, DUMP-ONEWAY, DUMP-ALL, 1LAP ... 9LAPS,"
+ " MAX-LAPS, RM-EMPTY, INPLACE, SILENT and LOG. See"
+ " https://szs.wiimm.de/opt/kmp for details."
+ },
+
+ { OPT_SPEED_MOD, false, false, false, false, false, 0, "speed-mod",
+ "factor",
+ "The speed modifier is a user extensions to change the basic speed of"
+ " all vehicles. The speed factor itself is stored into KMP:STGI"
+ " section of a track.\n"
+ " If --speed-mod is set to a value >0.0, then the last 2 bytes of"
+ " the STGI section are patched. The value 0.0 reset these 2 bytes and"
+ " deactivates the speed modifier."
+ },
+
+ { OPT_KTPT2, false, false, false, false, false, 0, "ktpt2",
+ "vector",
+ "Insert or replace a second KTPT. Use VECTOR as new position. VECTOR"
+ " is either X,Z or X,Y,Z or an expression. Set Y to 0 for an automatic"
+ " defined height.\n"
+ " If the first 4 characters of VECTOR are 'AUTO' (ignoring case),"
+ " then the position is calculated automatically and set to the"
+ " recommendation of command wkmpt KTPT.\n"
+ " The tool looks for the nearest lap counter (CKPT with mode 0) and"
+ " adjust the KTPT: The direction of the lap counter is copied and the"
+ " KTPT is moved to the lap counter line using the new direction.\n"
+ " LE-CODE uses the second KTPT to draw the finish line at another"
+ " place away from the start position."
+ },
+
+ { OPT_TFORM_KMP, false, false, false, false, false, 0, "tform-kmp",
+ "list",
+ "Select KMP sections and objects for a transformation. --tkmp is a"
+ " short cut. The option expects a comma separated list of keywords."
+ " Non ambiguous of keywords are allowed and minus signs within"
+ " keywords are optional (e.g. GOBJS). A minus sign before a keyword"
+ " disables transformation of the related section or object.\n"
+ " Sections are selected by the KMP section names AREA, CAME, CKPT,"
+ " CNPT, ENPT, GOBJ, ITPT, JGPT, KTPT, MSPT and POTI.\n"
+ " Objects are selected by the keywords AREA-POSITION, AREA-ROTATE,"
+ " AREA-SCALE, CAME-POSITION, CKPT-POSITION, CNPT-POSITION,"
+ " CNPT-ROTATE, ENPT-POSITION, ENPT-SCALE, GOBJ-POSITION, GOBJ-ROTATE,"
+ " GOBJ-SCALE, ITPT-POSITION, ITPT-SCALE, JGPT-POSITION, JGPT-ROTATE,"
+ " KTPT-POSITION, KTPT-ROTATE, MSPT-POSITION, MSPT-ROTATE and"
+ " POTI-POSITION.\n"
+ " The keywords NONE and ALL (default) complete the field."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, true, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, true, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_TINY, false, false, false, false, false, 0, "tiny",
+ "mode",
+ "Set tiny mode to a level between 0 and 7. See"
+ " https://szs.wiimm.de/opt/tiny for details."
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 91
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOUT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in KMP text files."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_TEST_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Print the matrices of transformations."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set once, suppress vector dumps for transformation steps and"
+ " ignore option --long. If set twice, suppress vector dump for final"
+ " transformation too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set once, print inverse matrix for the final transformation. If"
+ " set twice, print inverse matrix for all transformations."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Option --quiet is dedicated to automatic tests comparing the old and"
+ " new transformation algorithms. If set once, the tables are only"
+ " printed, if the results differ. If set twice, nothing is printed at"
+ " all and only the exit status will inform about the results."
+ };
+
+static const InfoOption_t option_cmd_OBJECTS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Don't print the file list and the info line(s). If set twice, only ID"
+ " and object name is printed and option --long is ignored."
+ };
+
+static const InfoOption_t option_cmd_OBJECTS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print each setting starting on a new line. --long and --brief can be"
+ " used together."
+ };
+
+static const InfoOption_t option_cmd_DIFF_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "If set once, only a summary status is printed. If set twice, the"
+ " status is only reported as exit status."
+ };
+
+static const InfoOption_t option_cmd_CHECK_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only warnings and suppress hints."
+ };
+
+static const InfoOption_t option_cmd_CHECK_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Be verbose and print more statistics."
+ };
+
+static const InfoOption_t option_cmd_CHECK_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet until the first warning or hint is found."
+ };
+
+static const InfoOption_t option_cmd_STGI_IGNORE =
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "If set, ignore non existing source files and files without KMP"
+ " without warning. If set twice, ignore files with standard settings"
+ " too."
+ };
+
+static const InfoOption_t option_cmd_KTPT_IGNORE =
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "If set, ignore non existing source files and files without KMP"
+ " without warning."
+ };
+
+static const InfoOption_t option_cmd_KTPT_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, compare each KTPT with each lap counter (some CKPT) and print"
+ " positions, directions, distances and recommendations as wide table."
+ };
+
+static const InfoOption_t option_cmd_ROUTES_IGNORE =
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "If set, ignore non existing source files and files without KMP"
+ " without warning."
+ };
+
+static const InfoOption_t option_cmd_GOBJ_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress head and foot lines."
+ };
+
+static const InfoOption_t option_cmd_GOBJ_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only summary for each object category. If set twice, print a"
+ " status vector only."
+ };
+
+static const InfoOption_t option_cmd_GOBJ_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "?"
+ };
+
+static const InfoOption_t option_cmd_GAMEMODES_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress head and foot lines."
+ };
+
+static const InfoOption_t option_cmd_GAMEMODES_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the scenario version and configuration name. If set twice,"
+ " suppress ead and foot lines too."
+ };
+
+static const InfoOption_t option_cmd_GAMEMODES_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, print a status vector for each GOBJ element too: '-': Object"
+ " diabled; '=': Object diabled by presence flags, but visible before"
+ " race; '+': Object enabled; 'e': Depends on engine; 'r': Depends on"
+ " random scenario; 'b': Defintion object of type BITS; 'o': Defintion"
+ " object of type OR; 'a': Defintion object of type AND."
+ };
+
+static const InfoOption_t option_cmd_WIM0_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, disable table format and append a full hexdump for each WIM0"
+ " section."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_MATRIX, "MATRIX", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_STARTPOS, "STARTPOS", "SP", 0 },
+ { CMD_OBJECTS, "OBJECTS", "OBJ", 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_XEXPORT, "_XEXPORT", 0, 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+ { CMD_DIFF, "DIFF", "CMP", 0 },
+ { CMD_DRAW, "DRAW", "D", 0 },
+ { CMD_DRAW, "COBJECT", "COB", 0 },
+ { CMD_CHECK, "CHECK", "CHK", 0 },
+ { CMD_STGI, "STGI", 0, 0 },
+ { CMD_KTPT, "KTPT", 0, 0 },
+ { CMD_ROUTES, "ROUTES", 0, 0 },
+ { CMD_GOBJ, "GOBJ", 0, 0 },
+ { CMD_GAMEMODES, "GAMEMODES", "GMODES", 0 },
+ { CMD_WIM0, "WIM0", "W0", 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:w:lHBXPGNM:T:A:td:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "scale", 1, 0, GO_SCALE },
+ { "shift", 1, 0, GO_SHIFT },
+ { "xss", 1, 0, GO_XSS },
+ { "yss", 1, 0, GO_YSS },
+ { "zss", 1, 0, GO_ZSS },
+ { "rot", 1, 0, GO_ROT },
+ { "xrot", 1, 0, GO_XROT },
+ { "yrot", 1, 0, GO_YROT },
+ { "hrot", 1, 0, GO_YROT },
+ { "zrot", 1, 0, GO_ZROT },
+ { "ypos", 1, 0, GO_YPOS },
+ { "translate", 1, 0, GO_TRANSLATE },
+ { "null", 0, 0, GO_NULL },
+ { "next", 0, 0, GO_NEXT },
+ { "ascale", 1, 0, GO_ASCALE },
+ { "arot", 1, 0, GO_AROT },
+ { "tform-script", 1, 0, GO_TFORM_SCRIPT },
+ { "tformscript", 1, 0, GO_TFORM_SCRIPT },
+ { "rm-gobj", 1, 0, GO_RM_GOBJ },
+ { "rmgobj", 1, 0, GO_RM_GOBJ },
+ { "battle", 2, 0, GO_BATTLE },
+ { "export-flags", 2, 0, GO_EXPORT_FLAGS },
+ { "exportflags", 2, 0, GO_EXPORT_FLAGS },
+ { "exflags", 2, 0, GO_EXPORT_FLAGS },
+ { "route-options", 2, 0, GO_ROUTE_OPTIONS },
+ { "routeoptions", 2, 0, GO_ROUTE_OPTIONS },
+ { "ropt", 2, 0, GO_ROUTE_OPTIONS },
+ { "wim0", 2, 0, GO_WIM0 },
+ { "slot", 1, 0, GO_SLOT },
+ { "draw", 1, 0, 'w' },
+ { "pos-mode", 1, 0, GO_POS_MODE },
+ { "posmode", 1, 0, GO_POS_MODE },
+ { "pos-file", 1, 0, GO_POS_FILE },
+ { "posfile", 1, 0, GO_POS_FILE },
+ { "png", 1, 0, GO_PNG },
+ { "load-kcl", 1, 0, GO_LOAD_KCL },
+ { "loadkcl", 1, 0, GO_LOAD_KCL },
+ { "kcl", 1, 0, GO_KCL },
+ { "kcl-flag", 1, 0, GO_KCL_FLAG },
+ { "kclflag", 1, 0, GO_KCL_FLAG },
+ { "kcl-script", 1, 0, GO_KCL_SCRIPT },
+ { "kclscript", 1, 0, GO_KCL_SCRIPT },
+ { "tri-area", 1, 0, GO_TRI_AREA },
+ { "triarea", 1, 0, GO_TRI_AREA },
+ { "tri-height", 1, 0, GO_TRI_HEIGHT },
+ { "triheight", 1, 0, GO_TRI_HEIGHT },
+ { "tri-ht", 1, 0, GO_TRI_HEIGHT },
+ { "triht", 1, 0, GO_TRI_HEIGHT },
+ { "kcl-min", 1, 0, GO_TRI_HEIGHT },
+ { "kclmin", 1, 0, GO_TRI_HEIGHT },
+ { "flag-file", 1, 0, GO_FLAG_FILE },
+ { "flagfile", 1, 0, GO_FLAG_FILE },
+ { "xtridata", 2, 0, GO_XTRIDATA },
+ { "xtri", 2, 0, GO_XTRIDATA },
+ { "kmp", 1, 0, GO_KMP },
+ { "speed-mod", 1, 0, GO_SPEED_MOD },
+ { "speedmod", 1, 0, GO_SPEED_MOD },
+ { "ktpt2", 1, 0, GO_KTPT2 },
+ { "tform-kmp", 1, 0, GO_TFORM_KMP },
+ { "tformkmp", 1, 0, GO_TFORM_KMP },
+ { "tkmp", 1, 0, GO_TFORM_KMP },
+ { "repair-xpflags", 1, 0, GO_REPAIR_XPF },
+ { "repairxpflags", 1, 0, GO_REPAIR_XPF },
+ { "repxpf", 1, 0, GO_REPAIR_XPF },
+ { "gamemodes", 1, 0, GO_GAMEMODES },
+ { "gmodes", 1, 0, GO_GAMEMODES },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "export", 0, 0, 'X' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "epsilon", 1, 0, GO_EPSILON },
+ { "diff", 1, 0, GO_DIFF },
+ { "generic", 0, 0, 'G' },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "no-check", 0, 0, 'N' },
+ { "nocheck", 0, 0, 'N' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "tiny", 1, 0, GO_TINY },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 */ 0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,
+ /* 0x047 G */ OPT_GENERIC,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e N */ OPT_NO_CHECK,
+ /* 0x04f */ 0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,
+ /* 0x058 X */ OPT_EXPORT,
+ /* 0x059 */ 0,0,0,0, 0,0,0,0, 0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 w */ OPT_DRAW,
+ /* 0x078 */ 0,0,0,0, 0,0,0,0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_SCALE,
+ /* 0x08b */ OPT_SHIFT,
+ /* 0x08c */ OPT_XSS,
+ /* 0x08d */ OPT_YSS,
+ /* 0x08e */ OPT_ZSS,
+ /* 0x08f */ OPT_ROT,
+ /* 0x090 */ OPT_XROT,
+ /* 0x091 */ OPT_YROT,
+ /* 0x092 */ OPT_ZROT,
+ /* 0x093 */ OPT_YPOS,
+ /* 0x094 */ OPT_TRANSLATE,
+ /* 0x095 */ OPT_NULL,
+ /* 0x096 */ OPT_NEXT,
+ /* 0x097 */ OPT_ASCALE,
+ /* 0x098 */ OPT_AROT,
+ /* 0x099 */ OPT_TFORM_SCRIPT,
+ /* 0x09a */ OPT_RM_GOBJ,
+ /* 0x09b */ OPT_BATTLE,
+ /* 0x09c */ OPT_EXPORT_FLAGS,
+ /* 0x09d */ OPT_ROUTE_OPTIONS,
+ /* 0x09e */ OPT_WIM0,
+ /* 0x09f */ OPT_SLOT,
+ /* 0x0a0 */ OPT_POS_MODE,
+ /* 0x0a1 */ OPT_POS_FILE,
+ /* 0x0a2 */ OPT_PNG,
+ /* 0x0a3 */ OPT_LOAD_KCL,
+ /* 0x0a4 */ OPT_KCL,
+ /* 0x0a5 */ OPT_KCL_FLAG,
+ /* 0x0a6 */ OPT_KCL_SCRIPT,
+ /* 0x0a7 */ OPT_TRI_AREA,
+ /* 0x0a8 */ OPT_TRI_HEIGHT,
+ /* 0x0a9 */ OPT_FLAG_FILE,
+ /* 0x0aa */ OPT_XTRIDATA,
+ /* 0x0ab */ OPT_KMP,
+ /* 0x0ac */ OPT_SPEED_MOD,
+ /* 0x0ad */ OPT_KTPT2,
+ /* 0x0ae */ OPT_TFORM_KMP,
+ /* 0x0af */ OPT_REPAIR_XPF,
+ /* 0x0b0 */ OPT_GAMEMODES,
+ /* 0x0b1 */ OPT_ROUND,
+ /* 0x0b2 */ OPT_EPSILON,
+ /* 0x0b3 */ OPT_DIFF,
+ /* 0x0b4 */ OPT_NO_ECHO,
+ /* 0x0b5 */ OPT_UTF_8,
+ /* 0x0b6 */ OPT_NO_UTF_8,
+ /* 0x0b7 */ OPT_FORCE,
+ /* 0x0b8 */ OPT_REPAIR_MAGICS,
+ /* 0x0b9 */ OPT_TINY,
+ /* 0x0ba */ OPT_OLD,
+ /* 0x0bb */ OPT_STD,
+ /* 0x0bc */ OPT_NEW,
+ /* 0x0bd */ OPT_EXTRACT,
+ /* 0x0be */ OPT_NUMBER,
+ /* 0x0bf */ OPT_SECTIONS,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[49] = // cmd #1
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1
+};
+
+static u8 option_allowed_cmd_HELP[49] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1
+};
+
+static u8 option_allowed_cmd_ARGTEST[49] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1
+};
+
+static u8 option_allowed_cmd_TEST[49] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1
+};
+
+static u8 option_allowed_cmd_COLORS[49] = // cmd #5
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_ERROR[49] = // cmd #6
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1
+};
+
+static u8 option_allowed_cmd_FILETYPE[49] = // cmd #7
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[49] = // cmd #8
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[49] = // cmd #9
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[49] = // cmd #10
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_CALCULATE[49] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_MATRIX[49] = // cmd #12
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,1,0,0,1,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_FLOAT[49] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_STARTPOS[49] = // cmd #14
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,1,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_OBJECTS[49] = // cmd #15
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_EXPORT[49] = // cmd #16
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_XEXPORT[49] = // cmd #17
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_CAT[49] = // cmd #18
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,1,0,0,0,
+ 1,1,1,1,0, 0,1,1,1,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_DECODE[49] = // cmd #19
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,1,0,0,0,
+ 1,1,1,1,0, 0,1,1,1,1, 1,1,1,1,1, 1,1,1,0
+};
+
+static u8 option_allowed_cmd_ENCODE[49] = // cmd #20
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,1,0,0,0,
+ 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,0
+};
+
+static u8 option_allowed_cmd_DIFF[49] = // cmd #21
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,1, 1,0,0,0,1, 0,1,0,0,0, 0,0,0,0
+};
+
+static u8 option_allowed_cmd_DRAW[49] = // cmd #22
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,0,1, 0,1,0,0,0,
+ 1,1,1,1,0, 0,1,1,1,1, 1,1,1,1,1, 1,1,1,0
+};
+
+static u8 option_allowed_cmd_CHECK[49] = // cmd #23
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 0,1,0,0,0, 0,1,1,1,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_STGI[49] = // cmd #24
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_KTPT[49] = // cmd #25
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_ROUTES[49] = // cmd #26
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_GOBJ[49] = // cmd #27
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_GAMEMODES[49] = // cmd #28
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1,
+ 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+static u8 option_allowed_cmd_WIM0[49] = // cmd #29
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+ OptionInfo + OPT_TINY,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+ &option_cmd_TEST_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MATRIX[] =
+{
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_MATRIX_BRIEF,
+ &option_cmd_MATRIX_LONG,
+ &option_cmd_MATRIX_QUIET,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_STARTPOS[] =
+{
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_OBJECTS[] =
+{
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_OBJECTS_BRIEF,
+ &option_cmd_OBJECTS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_XEXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_GENERIC,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_GENERIC,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DIFF[] =
+{
+ &option_cmd_DIFF_QUIET,
+ OptionInfo + OPT_EPSILON,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_ESC,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DRAW[] =
+{
+ OptionInfo + OPT_DRAW,
+ OptionInfo + OPT_POS_MODE,
+ OptionInfo + OPT_POS_FILE,
+ OptionInfo + OPT_PNG,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_GENERIC,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL_SCRIPT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CHECK[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_CHECK_BRIEF,
+ &option_cmd_CHECK_LONG,
+ &option_cmd_CHECK_QUIET,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_GENERIC,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_STGI[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_STGI_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_KTPT[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_KTPT2,
+ &option_cmd_KTPT_IGNORE,
+ &option_cmd_KTPT_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ROUTES[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ROUTES_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_GOBJ[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_GOBJ_NO_HEADER,
+ &option_cmd_GOBJ_BRIEF,
+ &option_cmd_GOBJ_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_GAMEMODES[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_GAMEMODES,
+ &option_cmd_GAMEMODES_NO_HEADER,
+ &option_cmd_GAMEMODES_BRIEF,
+ &option_cmd_GAMEMODES_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_WIM0[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_WIM0_LONG,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wkmpt",
+ 0,
+ "wkmpt [option]... command [option|parameter|file]...",
+ "Wiimms KMP Tool : Analyze, modify, export and create (compile) KMP"
+ " files.",
+ 0,
+ 33,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wkmpt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wkmpt HELP [--width=wd] OPT|OPTION ...\n"
+ "wkmpt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wkmpt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wkmpt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wkmpt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wkmpt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 1,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wkmpt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wkmpt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wkmpt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wkmpt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wkmpt SYMBOLS",
+ "Print predefined symbols of text parser to standard output. The KMP"
+ " specific symbols are included.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wkmpt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the KMP specific"
+ " functions. If one key ore more key entered, then only functions that"
+ " match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wkmpt CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_MATRIX,
+ false,
+ false,
+ false,
+ "MATRIX",
+ 0,
+ "wkmpt MATRIX [patch-option]... [vector]...",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results.",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results. The transformations are done with 4"
+ " different methods to confirm the algorithms. Only the main results"
+ " and results, which differ, are printed.\n"
+ " Normally, the exit status is OK (null). If at least one old"
+ " transformation returns different results for the different"
+ " algorithms, then status DIFFER (not null) is returned.",
+ 32,
+ option_tab_cmd_MATRIX,
+ option_allowed_cmd_MATRIX
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wkmpt FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_STARTPOS,
+ false,
+ false,
+ false,
+ "STARTPOS",
+ "SP",
+ "wkmpt STARTPOS [patch-option]... key_or_file...",
+ "Print an ASCII image or a table of the start positions. The parameter"
+ " list is a wild mix of filenames, keywords and numbers.\n"
+ " If a parameter contains a slash ('/' or '\\'), it is a filename of"
+ " a KMP or SZS file and a KMP is loaded. The KMP is used to print"
+ " absolute positions and to find the settings for LEFT/RIGHT and"
+ " WIDE/NARROW automatically.\n"
+ " A parameter may also be one of the following keywords to define a"
+ " setting: RESET, IMAGE, TABLE, RELATIVE, ABSOLUTE, LEFT, RIGHT, WIDE,"
+ " NARROW, AUTO, NO-AUTO, DECIMAL, HEXADECIMAL, Z0, Z1, Z2, Z3. A table"
+ " or image is only printed on numbers 1 to 12.\n"
+ " See https://szs.wiimm.de/cmd/wkmpt/startpos for details.",
+ 0,
+ 29,
+ option_tab_cmd_STARTPOS,
+ option_allowed_cmd_STARTPOS
+ },
+
+ { CMD_OBJECTS,
+ false,
+ false,
+ false,
+ "OBJECTS",
+ "OBJ",
+ "wkmpt OBJECTS key...",
+ "Infos about all objects, that match any of the entered keys, are"
+ " printed. A key match, if the text is part of the object name, file"
+ " list or info (ignoring case). If a key is a number (decimal or hex),"
+ " the object with that id matches too. This command uses an internal"
+ " object and file database. An online query is also available:"
+ " https://szs.wiimm.de/cgi/mkw/object",
+ 0,
+ 4,
+ option_tab_cmd_OBJECTS,
+ option_allowed_cmd_OBJECTS
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wkmpt _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_XEXPORT,
+ true,
+ false,
+ false,
+ "_XEXPORT",
+ 0,
+ "wkmpt _XEXPORT",
+ "Export some tables for LE-CODE.",
+ 0,
+ 0,
+ option_tab_cmd_XEXPORT,
+ option_allowed_cmd_XEXPORT
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ true,
+ "CAT",
+ 0,
+ "wkmpt CAT [source]...",
+ "Read the entered KMP files (text, binary or szs) and print them as"
+ " decoded text files to standard output. The output of all source"
+ " files is concatenated.",
+ 0,
+ 37,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wkmpt DECODE [source]...",
+ "Read the entered KMP files (text or binary) and decode them to text"
+ " files. The default destination is '%P/%N.txt'.",
+ 0,
+ 45,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "ENCODE",
+ "ENC",
+ "wkmpt ENCODE source...",
+ "Read the entered KMP files (text or binary) and encode (compile) them"
+ " to binary files. The default destination is '%P/%N.kmp'.",
+ 0,
+ 40,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ { CMD_DIFF,
+ false,
+ false,
+ false,
+ "DIFF",
+ "CMP",
+ "wkmpt DIFF source1 source2\n"
+ "wkmpt DIFF source... --dest dest",
+ "Compare the KMP of two or more sources (KMP, KMP-text or SZS). Each"
+ " KMP will be converted into the internal format, and then fixed and"
+ " patched controlled by options. Only the known sections are compared."
+ " If option SORT (see --diff) is set, elements of section GOBJ are"
+ " sorted by object-id.\n"
+ " This command is in development. So for the section POTI only a"
+ " simple notice about the different data record is printed.\n"
+ " If option --dest is set, then each source file is compared with a"
+ " file in the destination.",
+ 0,
+ 5,
+ option_tab_cmd_DIFF,
+ option_allowed_cmd_DIFF
+ },
+
+ { CMD_DRAW,
+ false,
+ false,
+ false,
+ "DRAW",
+ "D",
+ "wkmpt DRAW source...",
+ "Read the entered KMP files (text or binary), of needed load the"
+ " related KCL file, draw KMP objects and create an OBJ file. The"
+ " default destination is '%P/%N.kmp.obj'.\n"
+ " Automated dropping of bad KCL triangles is enabled if no drop"
+ " option is specified by option --kcl.",
+ 0,
+ 50,
+ option_tab_cmd_DRAW,
+ option_allowed_cmd_DRAW
+ },
+
+ { CMD_CHECK,
+ false,
+ false,
+ false,
+ "CHECK",
+ "CHK",
+ "wkmpt CHECK source...",
+ "Read the entered KMP files (text or binary) and and make a"
+ " plausibility check. Hints and warnings are written to standard"
+ " output. The exit status is 'DIFFER' if at least one KMP warning"
+ " found.",
+ 0,
+ 9,
+ option_tab_cmd_CHECK,
+ option_allowed_cmd_CHECK
+ },
+
+ { CMD_STGI,
+ false,
+ false,
+ false,
+ "STGI",
+ 0,
+ "wkmpt STGI file...",
+ "Find the first KMP:STGI of each file and print an analysis of it as"
+ " single line statistic. Additional the number of lap counter check"
+ " points ('LC') is printed. Track and KMP (binary and text) files are"
+ " accepted as input.",
+ 0,
+ 4,
+ option_tab_cmd_STGI,
+ option_allowed_cmd_STGI
+ },
+
+ { CMD_KTPT,
+ false,
+ false,
+ false,
+ "KTPT",
+ 0,
+ "wkmpt KTPT [source]...",
+ "Analyse the start positions (KMP:KTPT) and lap counters (KMP:CKPT"
+ " with mode 0) and print a simple information list. Use enemy points"
+ " (KMP:ENPT) to find recommendations.\n"
+ " This command is dedicated to LE-CODE, which supports an alternative"
+ " position for the finish line at the minimap.",
+ 0,
+ 5,
+ option_tab_cmd_KTPT,
+ option_allowed_cmd_KTPT
+ },
+
+ { CMD_ROUTES,
+ false,
+ false,
+ false,
+ "ROUTES",
+ 0,
+ "wkmpt ROUTES file...",
+ "Print the internal cross references for routes of KMP sections CKPH,"
+ " CKPT, ENPH, ENPT, ITPH and ITPT.",
+ 0,
+ 4,
+ option_tab_cmd_ROUTES,
+ option_allowed_cmd_ROUTES
+ },
+
+ { CMD_GOBJ,
+ true,
+ false,
+ false,
+ "GOBJ",
+ 0,
+ "wkmpt GOBJ [source]...",
+ "Analyze the objects of KMP section GOBJ and print a status line for"
+ " each object. ...",
+ 0,
+ 4,
+ option_tab_cmd_GOBJ,
+ option_allowed_cmd_GOBJ
+ },
+
+ { CMD_GAMEMODES,
+ false,
+ false,
+ false,
+ "GAMEMODES",
+ "GMODES",
+ "wkmpt GAMEMODES [source]...",
+ "Analyze the presence flags combinations with and without extension"
+ " support and print a list. The lists consists of index, scenario"
+ " version and scenario name. Scenario versions are only equal, if the"
+ " scenarios are duplicates. Duplicates happens only, if --gamemodes"
+ " option TT or FULL is set.",
+ 0,
+ 5,
+ option_tab_cmd_GAMEMODES,
+ option_allowed_cmd_GAMEMODES
+ },
+
+ { CMD_WIM0,
+ false,
+ false,
+ false,
+ "WIM0",
+ "W0",
+ "wkmpt WIM0 [source]...",
+ "Analyze the WIM0 section of each KMP file (text, binary or szs) and"
+ " print an info about it.",
+ 0,
+ 2,
+ option_tab_cmd_WIM0,
+ option_allowed_cmd_WIM0
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wkmpt =
+{
+ "wkmpt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wkmpt.h b/project/src/ui/ui-wkmpt.h
new file mode 100644
index 0000000..34468b7
--- /dev/null
+++ b/project/src/ui/ui-wkmpt.h
@@ -0,0 +1,536 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WKMPT_H
+#define SZS_UI_WKMPT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_SCALE,
+ OPT_SHIFT,
+ OPT_XSS,
+ OPT_YSS,
+ OPT_ZSS,
+ OPT_ROT,
+ OPT_XROT,
+ OPT_YROT,
+ OPT_ZROT,
+ OPT_YPOS,
+ OPT_TRANSLATE,
+ OPT_NULL,
+ OPT_NEXT,
+ OPT_ASCALE,
+ OPT_AROT,
+ OPT_TFORM_SCRIPT,
+ OPT_RM_GOBJ,
+ OPT_SLOT,
+ OPT_DRAW,
+ OPT_POS_MODE,
+ OPT_POS_FILE,
+ OPT_PNG,
+ OPT_KCL_FLAG,
+ OPT_KCL_SCRIPT,
+ OPT_FLAG_FILE,
+ OPT_REPAIR_XPF,
+ OPT_GAMEMODES,
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_EXPORT,
+ OPT_NO_PARAM,
+ OPT_EPSILON,
+ OPT_DIFF,
+ OPT_GENERIC,
+ OPT_NO_ECHO,
+ OPT_NO_CHECK,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 49
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_BATTLE,
+ OPT_EXPORT_FLAGS,
+ OPT_ROUTE_OPTIONS,
+ OPT_WIM0,
+ OPT_LOAD_KCL,
+ OPT_KCL,
+ OPT_TRI_AREA,
+ OPT_TRI_HEIGHT,
+ OPT_XTRIDATA,
+ OPT_KMP,
+ OPT_SPEED_MOD,
+ OPT_KTPT2,
+ OPT_TFORM_KMP,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_TINY,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 91
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_SCALE = 1llu << OPT_SCALE,
+// OB_SHIFT = 1llu << OPT_SHIFT,
+// OB_XSS = 1llu << OPT_XSS,
+// OB_YSS = 1llu << OPT_YSS,
+// OB_ZSS = 1llu << OPT_ZSS,
+// OB_ROT = 1llu << OPT_ROT,
+// OB_XROT = 1llu << OPT_XROT,
+// OB_YROT = 1llu << OPT_YROT,
+// OB_ZROT = 1llu << OPT_ZROT,
+// OB_YPOS = 1llu << OPT_YPOS,
+// OB_TRANSLATE = 1llu << OPT_TRANSLATE,
+// OB_NULL = 1llu << OPT_NULL,
+// OB_NEXT = 1llu << OPT_NEXT,
+// OB_ASCALE = 1llu << OPT_ASCALE,
+// OB_AROT = 1llu << OPT_AROT,
+// OB_TFORM_SCRIPT = 1llu << OPT_TFORM_SCRIPT,
+// OB_RM_GOBJ = 1llu << OPT_RM_GOBJ,
+// OB_SLOT = 1llu << OPT_SLOT,
+// OB_DRAW = 1llu << OPT_DRAW,
+// OB_POS_MODE = 1llu << OPT_POS_MODE,
+// OB_POS_FILE = 1llu << OPT_POS_FILE,
+// OB_PNG = 1llu << OPT_PNG,
+// OB_KCL_FLAG = 1llu << OPT_KCL_FLAG,
+// OB_KCL_SCRIPT = 1llu << OPT_KCL_SCRIPT,
+// OB_FLAG_FILE = 1llu << OPT_FLAG_FILE,
+// OB_REPAIR_XPF = 1llu << OPT_REPAIR_XPF,
+// OB_GAMEMODES = 1llu << OPT_GAMEMODES,
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_EXPORT = 1llu << OPT_EXPORT,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_EPSILON = 1llu << OPT_EPSILON,
+// OB_DIFF = 1llu << OPT_DIFF,
+// OB_GENERIC = 1llu << OPT_GENERIC,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_NO_CHECK = 1llu << OPT_NO_CHECK,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_TRANSFORM = OB_SCALE
+// | OB_SHIFT
+// | OB_XSS
+// | OB_YSS
+// | OB_ZSS
+// | OB_ROT
+// | OB_XROT
+// | OB_YROT
+// | OB_ZROT
+// | OB_YPOS
+// | OB_TRANSLATE
+// | OB_NULL
+// | OB_NEXT
+// | OB_ASCALE
+// | OB_AROT
+// | OB_TFORM_SCRIPT
+// | OB_REPAIR_XPF
+// | OB_RM_GOBJ
+// | OB_SLOT,
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_TEXTOUT = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_EXPORT
+// | OB_NO_PARAM
+// | OB_GENERIC,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_MATRIX = OB_GRP_TRANSFORM
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_STARTPOS = OB_GRP_TRANSFORM,
+//
+// OB_CMD_OBJECTS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_XEXPORT = 0,
+//
+// OB_CMD_CAT = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_ENCODE = OB_GRP_DEST
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_DIFF = OB_EPSILON
+// | OB_DIFF
+// | OB_DEST
+// | OB_ESC,
+//
+// OB_CMD_DRAW = OB_DRAW
+// | OB_POS_MODE
+// | OB_POS_FILE
+// | OB_PNG
+// | OB_CMD_DECODE
+// | OB_KCL_SCRIPT,
+//
+// OB_CMD_CHECK = OB_BRIEF
+// | OB_LONG
+// | OB_NO_ECHO
+// | OB_GENERIC
+// | OB_NO_CHECK
+// | OB_IGNORE,
+//
+// OB_CMD_STGI = OB_NO_HEADER
+// | OB_IGNORE,
+//
+// OB_CMD_KTPT = OB_IGNORE
+// | OB_LONG,
+//
+// OB_CMD_ROUTES = OB_NO_HEADER
+// | OB_IGNORE,
+//
+// OB_CMD_GOBJ = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_GAMEMODES = OB_IGNORE
+// | OB_GAMEMODES
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_WIM0 = OB_IGNORE
+// | OB_LONG,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_MATRIX,
+ CMD_FLOAT,
+ CMD_STARTPOS,
+ CMD_OBJECTS,
+ CMD_EXPORT,
+ CMD_XEXPORT,
+
+ CMD_CAT,
+ CMD_DECODE,
+ CMD_ENCODE,
+ CMD_DIFF,
+ CMD_DRAW,
+ CMD_CHECK,
+ CMD_STGI,
+ CMD_KTPT,
+ CMD_ROUTES,
+ CMD_GOBJ,
+ CMD_GAMEMODES,
+ CMD_WIM0,
+
+
+ CMD__N // == 30
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_GENERIC = 'G',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_CHECK = 'N',
+ GO_NO_PARAM = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+ GO_EXPORT = 'X',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+ GO_DRAW = 'w',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_SCALE,
+ GO_SHIFT,
+ GO_XSS,
+ GO_YSS,
+ GO_ZSS,
+ GO_ROT,
+ GO_XROT,
+ GO_YROT,
+ GO_ZROT,
+ GO_YPOS,
+ GO_TRANSLATE,
+ GO_NULL,
+ GO_NEXT,
+ GO_ASCALE,
+ GO_AROT,
+ GO_TFORM_SCRIPT,
+ GO_RM_GOBJ,
+ GO_BATTLE,
+ GO_EXPORT_FLAGS,
+ GO_ROUTE_OPTIONS,
+ GO_WIM0,
+ GO_SLOT,
+ GO_POS_MODE,
+ GO_POS_FILE,
+ GO_PNG,
+ GO_LOAD_KCL,
+ GO_KCL,
+ GO_KCL_FLAG,
+ GO_KCL_SCRIPT,
+ GO_TRI_AREA,
+ GO_TRI_HEIGHT,
+ GO_FLAG_FILE,
+ GO_XTRIDATA,
+ GO_KMP,
+ GO_SPEED_MOD,
+ GO_KTPT2,
+ GO_TFORM_KMP,
+ GO_REPAIR_XPF,
+ GO_GAMEMODES,
+ GO_ROUND,
+ GO_EPSILON,
+ GO_DIFF,
+ GO_NO_ECHO,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_TINY,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wkmpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WKMPT_H
+
diff --git a/project/src/ui/ui-wlect.c b/project/src/ui/ui-wlect.c
new file mode 100644
index 0000000..e590351
--- /dev/null
+++ b/project/src/ui/ui-wlect.c
@@ -0,0 +1,1865 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wlect.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress cross reference comments."
+ },
+
+ { OPT_EXPORT, false, false, false, false, false, 'X', "export",
+ 0,
+ "Enable the export mode and create small and machine readable text"
+ " files for easy post processing."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_LT_CLEAR, false, false, false, false, true, 0, "lt-clear",
+ 0,
+ "Clear LEX section TEST and remove the section if empty. This option"
+ " is executed before all other --lt-* options."
+ },
+
+ { OPT_LT_ONLINE, false, false, false, false, false, 0, "lt-online",
+ "value",
+ "Set LEX/TEST parameter OFFLINE-ONLINE to this MODE. MODE is one of"
+ " AUTO (default), NEVER or ALWAYS. If needed, LEX section TEST is"
+ " created or removed if empty."
+ },
+
+ { OPT_LT_N_PLAYERS, false, false, false, false, false, 0, "lt-n-players",
+ "offline,online",
+ "Set LEX/TEST parameters N-OFFLINE and N-ONLINE to these integer"
+ " values. If needed, LEX section TEST is created or removed if empty."
+ },
+
+ { OPT_LE_DEFINE, false, false, false, false, true, 0, "le-define",
+ "file",
+ "Use this file as definition file to patch LE-CODE. The file format"
+ " can be LE-BIN or any supported CT-CODE file (BRRES, TEX0, CT-CODE or"
+ " CT-TEXT)."
+ },
+
+ { OPT_LPAR, false, false, false, false, false, 0, "lpar",
+ "file",
+ "Read a LPAR file to overwrite settings of LE-CODE section LPAR."
+ },
+
+ { OPT_ALIAS, false, false, false, false, false, 0, "alias",
+ "list",
+ "The parameter is a comma separated list of SLOT=ALIAS elements. SLOT"
+ " defines the slot, for which the ALIAS is defined. ALIAS itself is a"
+ " slot number to be executed, if SLOT is selected. Empty and invalid"
+ " elements are ignored. Multiple usage is possible: the lists are"
+ " concatenated."
+ },
+
+ { OPT_ENGINE, false, false, false, false, false, 0, "engine",
+ "list",
+ "Define probabilities for engine classes. LIST is a vector for"
+ " 100cc,150cc,mirror If 200cc is enabled by --200cc, then vector is"
+ " interpreted as 150cc,200cc,mirror. Any numbers are accepted. They"
+ " are normalized to get a total of 100 percent. Use 0,1,0 to force"
+ " 150cc only. Use 0,0,0 to reset to Nintendos VR based choice."
+ },
+
+ { OPT_200CC, true, false, false, false, false, 0, "200cc",
+ "[=mode]",
+ "Enable or disable 200cc support. Mode is one of OFF, AUTO (default)"
+ " or ON (default, if option is used without parameter). LE-CODE hasn't"
+ " implemented this feature yet!"
+ },
+
+ { OPT_PERFMON, true, false, false, false, false, 0, "perf-mon",
+ "[=mode]",
+ "Enable or disable the performance monitor. Mode is one of OFF, AUTO"
+ " (default, don't change setting), ON (enable it for Wii only;"
+ " default, if option is used without parameter) or FORCE (enable it"
+ " for Wii and for Dolphin)."
+ },
+
+ { OPT_CUSTOM_TT, true, false, false, false, false, 0, "custom-tt",
+ "[=mode]",
+ "Enable or disable time trial for custom tracks. Mode is one of OFF,"
+ " AUTO (default) or ON (default, if option is used without parameter)."
+ },
+
+ { OPT_XPFLAGS, true, false, false, false, false, 0, "xpflags",
+ "[=mode]",
+ "Enable or disable support for Extended Presence Flags. Mode is one of"
+ " OFF, AUTO (default) or ON (default, if option is used without"
+ " parameter). Disable it only for tests!"
+ },
+
+ { OPT_TRACK_DIR, false, false, false, false, true, 0, "track-dir",
+ "directory",
+ "Define a destination directory, where track files are copied, moved"
+ " or linked to. Usually it is .../Race/Course/.\n"
+ " Files are searched in directories defined by --copy-tracks,"
+ " --move-tracks, --move1-tracks and --link-tracks in definition order."
+ " Already existing files are removed before operation."
+ },
+
+ { OPT_COPY_TRACKS, false, false, false, false, false, 0, "copy-tracks",
+ "directory",
+ "Define a search directory for all included tracks. Files found in"
+ " this directory are copied to the directory specified by option"
+ " --track-dir."
+ },
+
+ { OPT_MOVE_TRACKS, false, false, false, false, false, 0, "move-tracks",
+ "directory",
+ "Define a search directory for all included tracks. Files found in"
+ " this directory are moved to the directory specified by option"
+ " --track-dir. If moving fails, the file is copied and the source"
+ " removed."
+ },
+
+ { OPT_MOVE1_TRACKS, false, false, false, false, false, 0, "move1-tracks",
+ "directory",
+ "Define a search directory for all included tracks. Files found in"
+ " this directory are moved to the directory specified by option"
+ " --track-dir, but only if a file has not more than one hard link."
+ " This guarantees an unique version of the file. If the file has more"
+ " hard links or moving fails, the file is copied and the source"
+ " removed."
+ },
+
+ { OPT_LINK_TRACKS, false, false, false, false, false, 0, "link-tracks",
+ "directory",
+ "Define a search directory for all included tracks. Files found in"
+ " this directory are linked to the directory specified by option"
+ " --track-dir. If linking fails, the file is copied."
+ },
+
+ { OPT_COMPLETE, false, false, false, false, true, 'C', "complete",
+ 0,
+ " Append missing sections to the LEX file."
+ },
+
+ { OPT_LOAD_BMG, false, false, false, false, true, 0, "load-bmg",
+ "file",
+ "Load immediately the file to fill an internal message pool. The"
+ " option can be used multiple times to fill the message pool by"
+ " different sources. A later message overrides the previous message.\n"
+ " The internal message pool is patched by all --patch-bmg options."
+ },
+
+ { OPT_PATCH_BMG, false, false, false, false, false, 0, "patch-bmg",
+ "mode[cond][=param]",
+ "This option specifies a BMG patch mode. Some of the modes need a"
+ " parameter or a file name of a BMG patch file (raw or text BMG), both"
+ " separated by an equal sign. Modes with required file names are"
+ " PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL and NOTEQUAL."
+ " Modes with text parameter are FORMAT, REGEXP and RM-REGEXP. "
+ " Standalone modes are ID, ID-ALL, UNICODE, RM-ESCAPES, RM-CUPS,"
+ " CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY, LE-FILL,"
+ " X-COPY, X-FORCE-COPY and X-FILL. Unique abbreviations are allowed.\n"
+ " The optional condition COND is either '?MID' or '!MID'. In case of"
+ " '?MID', the patch is only applied if the message id MID already"
+ " exists. In case of '!MID', the patch is only applied if the message"
+ " id MID does not exists.\n"
+ " If this option is used multiple times, all patch files will be"
+ " processed in the entered order. Read"
+ " https://szs.wiimm.de/opt/patch-bmg for more details."
+ },
+
+ { OPT_MACRO_BMG, false, false, false, false, false, 0, "macro-bmg",
+ "file",
+ "Load a BMG file and add the messages to the macro library; already"
+ " existing entries are replaced. The macro library is accessed by"
+ " escape sequence \\m{MID} as fallback, if the active file has not"
+ " already defined the message MID by itself."
+ },
+
+ { OPT_PATCH_NAMES, false, false, false, false, false, 0, "patch-names",
+ 0,
+ "If set, the names of the CUP1 and CSR1 sections are patched by the"
+ " loaded BMG files directly after loading the source files."
+ },
+
+ { OPT_ORDER_BY, false, false, false, false, false, 0, "order-by",
+ "bmg",
+ "Load the BMG file and filter track names. Then before creating output"
+ " files, re-distribute the tracks of the additonal cups (9-) to the"
+ " same cups by the order of the read track names. Tracks without BMG"
+ " reference are placed at the end of all tracks. This option modifes"
+ " only the track order of the cups, but will not change any name."
+ },
+
+ { OPT_ORDER_ALL, false, false, false, false, false, 0, "order-all",
+ 0,
+ "Used together with option --order-by: Re-distribute the tracks of all"
+ " cups beginning with Mushroom Cup."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 41
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "This option is completely ignored by wlect. It only exists due to"
+ " compatibility with the other tools."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_LT_COND_BIT, false, false, false, false, false, 0, "lt-cond-bit",
+ "bitnum",
+ "Set LEX/TEST parameter COND-BIT to this integer value. Use -1 to"
+ " deactivate this COND-BIT. If needed, LEX section TEST are created or"
+ " removed if empty."
+ },
+
+ { OPT_LT_GAME_MODE, false, false, false, false, false, 0, "lt-game-mode",
+ "mode",
+ "Set LEX/TEST parameter GAME-MODE to this MODE. MODE is one of AUTO"
+ " (default), Balloon, COIN, VERSUS or ITEMRAIN. If needed, LEX section"
+ " TEST is created or removed if empty."
+ },
+
+ { OPT_LT_ENGINE, false, false, false, false, false, 0, "lt-engine",
+ "mode",
+ "Set LEX/TEST parameter ENGINE to this MODE. MODE is one of AUTO"
+ " (default), BATTLE, 50CC, 100CC, 150CC, 200CC, 150M or 200M. Only"
+ " track.szs files are modified. If needed, LEX section TEST is created"
+ " or removed if empty."
+ },
+
+ { OPT_LT_RANDOM, false, false, false, false, false, 0, "lt-random",
+ "index",
+ "Force a random scenario, if between 1 and 8. Value 0 enables auto"
+ " selection and -1 disables this option. If needed, LEX section TEST"
+ " is created or removed if empty."
+ },
+
+ { OPT_LEX_PURGE, false, false, false, false, false, 0, "lex-purge",
+ 0,
+ "Delete LEX sections without any impact. This option is executed after"
+ " all --lt-* options."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 72
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOPT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in LE text files."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+static const InfoOption_t option_cmd_DUMP_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "For LE-CODE binaries: If set, print cups with tracks or arenas. For"
+ " each track, property and music slot is printed in brackets. If set"
+ " twice, print a track list too.\n"
+ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)"
+ " of the element data. If set twice, print a hex dump of max 64 bytes"
+ " (4 lines). If set 3 times ore more, print a complete hex dump."
+ };
+
+static const InfoOption_t option_cmd_DUMP_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "For LE-CODE binaries: If set, print a track slot usage table."
+ };
+
+static const InfoOption_t option_cmd_BIN_DIFF_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Suppress all messages and tell result as exit status only."
+ };
+
+static const InfoOption_t option_cmd_BIN_DIFF_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be more verbose and tell, what tests are planned."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_DUMP, "DUMP", "D", 0 },
+ { CMD_DL, "DL", 0, 0 },
+ { CMD_DLL, "DLL", 0, 0 },
+ { CMD_BIN_DIFF, "BIN-DIFF", "BINDIFF", 0 },
+ { CMD_BIN_DIFF, "BD", 0, 0 },
+ { CMD_PATCH, "PATCH", "P", 0 },
+ { CMD_LPAR, "LPAR", 0, 0 },
+ { CMD_CREATE, "CREATE", "CR", 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHBXPM:tCd:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "export", 0, 0, 'X' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "lt-clear", 0, 0, GO_LT_CLEAR },
+ { "ltclear", 0, 0, GO_LT_CLEAR },
+ { "lt-online", 1, 0, GO_LT_ONLINE },
+ { "ltonline", 1, 0, GO_LT_ONLINE },
+ { "lt-n-players", 1, 0, GO_LT_N_PLAYERS },
+ { "lt-nplayers", 1, 0, GO_LT_N_PLAYERS },
+ { "ltnplayers", 1, 0, GO_LT_N_PLAYERS },
+ { "lt-cond-bit", 1, 0, GO_LT_COND_BIT },
+ { "lt-condbit", 1, 0, GO_LT_COND_BIT },
+ { "ltcondbit", 1, 0, GO_LT_COND_BIT },
+ { "lt-game-mode", 1, 0, GO_LT_GAME_MODE },
+ { "lt-gamemode", 1, 0, GO_LT_GAME_MODE },
+ { "ltgamemode", 1, 0, GO_LT_GAME_MODE },
+ { "lt-engine", 1, 0, GO_LT_ENGINE },
+ { "ltengine", 1, 0, GO_LT_ENGINE },
+ { "lt-random", 1, 0, GO_LT_RANDOM },
+ { "ltrandom", 1, 0, GO_LT_RANDOM },
+ { "lex-purge", 0, 0, GO_LEX_PURGE },
+ { "lexpurge", 0, 0, GO_LEX_PURGE },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "le-define", 1, 0, GO_LE_DEFINE },
+ { "ledefine", 1, 0, GO_LE_DEFINE },
+ { "lpar", 1, 0, GO_LPAR },
+ { "alias", 1, 0, GO_ALIAS },
+ { "engine", 1, 0, GO_ENGINE },
+ { "200cc", 2, 0, GO_200CC },
+ { "perf-mon", 2, 0, GO_PERFMON },
+ { "perfmon", 2, 0, GO_PERFMON },
+ { "custom-tt", 2, 0, GO_CUSTOM_TT },
+ { "customtt", 2, 0, GO_CUSTOM_TT },
+ { "xpflags", 2, 0, GO_XPFLAGS },
+ { "track-dir", 1, 0, GO_TRACK_DIR },
+ { "trackdir", 1, 0, GO_TRACK_DIR },
+ { "copy-tracks", 1, 0, GO_COPY_TRACKS },
+ { "copytracks", 1, 0, GO_COPY_TRACKS },
+ { "move-tracks", 1, 0, GO_MOVE_TRACKS },
+ { "movetracks", 1, 0, GO_MOVE_TRACKS },
+ { "move1-tracks", 1, 0, GO_MOVE1_TRACKS },
+ { "move1tracks", 1, 0, GO_MOVE1_TRACKS },
+ { "link-tracks", 1, 0, GO_LINK_TRACKS },
+ { "linktracks", 1, 0, GO_LINK_TRACKS },
+ { "complete", 0, 0, 'C' },
+ { "load-bmg", 1, 0, GO_LOAD_BMG },
+ { "loadbmg", 1, 0, GO_LOAD_BMG },
+ { "patch-bmg", 1, 0, GO_PATCH_BMG },
+ { "patchbmg", 1, 0, GO_PATCH_BMG },
+ { "pb", 1, 0, GO_PATCH_BMG },
+ { "macro-bmg", 1, 0, GO_MACRO_BMG },
+ { "macrobmg", 1, 0, GO_MACRO_BMG },
+ { "mb", 1, 0, GO_MACRO_BMG },
+ { "patch-names", 0, 0, GO_PATCH_NAMES },
+ { "patchnames", 0, 0, GO_PATCH_NAMES },
+ { "order-by", 1, 0, GO_ORDER_BY },
+ { "orderby", 1, 0, GO_ORDER_BY },
+ { "order", 1, 0, GO_ORDER_BY },
+ { "order-all", 0, 0, GO_ORDER_ALL },
+ { "orderall", 0, 0, GO_ORDER_ALL },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 */ 0,0,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 C */ OPT_COMPLETE,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e */ 0,0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,0,0,0, 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,
+ /* 0x058 X */ OPT_EXPORT,
+ /* 0x059 */ 0,0,0,0, 0,0,0,0, 0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_ROUND,
+ /* 0x08b */ OPT_NO_ECHO,
+ /* 0x08c */ OPT_UTF_8,
+ /* 0x08d */ OPT_NO_UTF_8,
+ /* 0x08e */ OPT_LT_CLEAR,
+ /* 0x08f */ OPT_LT_ONLINE,
+ /* 0x090 */ OPT_LT_N_PLAYERS,
+ /* 0x091 */ OPT_LT_COND_BIT,
+ /* 0x092 */ OPT_LT_GAME_MODE,
+ /* 0x093 */ OPT_LT_ENGINE,
+ /* 0x094 */ OPT_LT_RANDOM,
+ /* 0x095 */ OPT_LEX_PURGE,
+ /* 0x096 */ OPT_FORCE,
+ /* 0x097 */ OPT_REPAIR_MAGICS,
+ /* 0x098 */ OPT_OLD,
+ /* 0x099 */ OPT_STD,
+ /* 0x09a */ OPT_NEW,
+ /* 0x09b */ OPT_EXTRACT,
+ /* 0x09c */ OPT_LE_DEFINE,
+ /* 0x09d */ OPT_LPAR,
+ /* 0x09e */ OPT_ALIAS,
+ /* 0x09f */ OPT_ENGINE,
+ /* 0x0a0 */ OPT_200CC,
+ /* 0x0a1 */ OPT_PERFMON,
+ /* 0x0a2 */ OPT_CUSTOM_TT,
+ /* 0x0a3 */ OPT_XPFLAGS,
+ /* 0x0a4 */ OPT_TRACK_DIR,
+ /* 0x0a5 */ OPT_COPY_TRACKS,
+ /* 0x0a6 */ OPT_MOVE_TRACKS,
+ /* 0x0a7 */ OPT_MOVE1_TRACKS,
+ /* 0x0a8 */ OPT_LINK_TRACKS,
+ /* 0x0a9 */ OPT_LOAD_BMG,
+ /* 0x0aa */ OPT_PATCH_BMG,
+ /* 0x0ab */ OPT_MACRO_BMG,
+ /* 0x0ac */ OPT_PATCH_NAMES,
+ /* 0x0ad */ OPT_ORDER_BY,
+ /* 0x0ae */ OPT_ORDER_ALL,
+ /* 0x0af */ OPT_NUMBER,
+ /* 0x0b0 */ OPT_SECTIONS,
+ /* 0x0b1 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[41] = // cmd #1
+{
+ 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 1
+};
+
+static u8 option_allowed_cmd_HELP[41] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_ARGTEST[41] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_TEST[41] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1
+};
+
+static u8 option_allowed_cmd_COLORS[41] = // cmd #5
+{
+ 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_ERROR[41] = // cmd #6
+{
+ 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 1
+};
+
+static u8 option_allowed_cmd_FILETYPE[41] = // cmd #7
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[41] = // cmd #8
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[41] = // cmd #9
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[41] = // cmd #10
+{
+ 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_CALCULATE[41] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_FLOAT[41] = // cmd #12
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_EXPORT[41] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_DUMP[41] = // cmd #14
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_DL[41] = // cmd #15
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_DLL[41] = // cmd #16
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_BIN_DIFF[41] = // cmd #17
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0
+};
+
+static u8 option_allowed_cmd_PATCH[41] = // cmd #18
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0,
+ 0,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_LPAR[41] = // cmd #19
+{
+ 0,0,0,1,1, 1,0,0,0,0, 0,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_CREATE[41] = // cmd #20
+{
+ 0,0,0,1,1, 1,0,1,1,1, 1,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_CAT[41] = // cmd #21
+{
+ 0,0,0,1,1, 1,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 0
+};
+
+static u8 option_allowed_cmd_DECODE[41] = // cmd #22
+{
+ 0,0,0,1,1, 1,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,0,0,0,0,
+ 0,1,1,1,1, 1,1,1,1,1, 0
+};
+
+static u8 option_allowed_cmd_ENCODE[41] = // cmd #23
+{
+ 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,0,0,0,0,
+ 0,1,1,1,1, 1,1,1,1,1, 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DUMP[] =
+{
+ OptionInfo + OPT_LE_DEFINE,
+ OptionInfo + OPT_LPAR,
+ OptionInfo + OPT_ALIAS,
+ OptionInfo + OPT_ENGINE,
+ OptionInfo + OPT_200CC,
+ OptionInfo + OPT_PERFMON,
+ OptionInfo + OPT_CUSTOM_TT,
+ OptionInfo + OPT_XPFLAGS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_DUMP_LONG,
+ &option_cmd_DUMP_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DL[] =
+{
+ OptionInfo + OPT_LE_DEFINE,
+ OptionInfo + OPT_LPAR,
+ OptionInfo + OPT_ALIAS,
+ OptionInfo + OPT_ENGINE,
+ OptionInfo + OPT_200CC,
+ OptionInfo + OPT_PERFMON,
+ OptionInfo + OPT_CUSTOM_TT,
+ OptionInfo + OPT_XPFLAGS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_DUMP_LONG,
+ &option_cmd_DUMP_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DLL[] =
+{
+ OptionInfo + OPT_LE_DEFINE,
+ OptionInfo + OPT_LPAR,
+ OptionInfo + OPT_ALIAS,
+ OptionInfo + OPT_ENGINE,
+ OptionInfo + OPT_200CC,
+ OptionInfo + OPT_PERFMON,
+ OptionInfo + OPT_CUSTOM_TT,
+ OptionInfo + OPT_XPFLAGS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_DUMP_LONG,
+ &option_cmd_DUMP_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_BIN_DIFF[] =
+{
+ &option_cmd_BIN_DIFF_QUIET,
+ &option_cmd_BIN_DIFF_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_PATCH[] =
+{
+ OptionInfo + OPT_LE_DEFINE,
+ OptionInfo + OPT_LPAR,
+ OptionInfo + OPT_ALIAS,
+ OptionInfo + OPT_ENGINE,
+ OptionInfo + OPT_200CC,
+ OptionInfo + OPT_PERFMON,
+ OptionInfo + OPT_CUSTOM_TT,
+ OptionInfo + OPT_XPFLAGS,
+ OptionInfo + OPT_TRACK_DIR,
+ OptionInfo + OPT_COPY_TRACKS,
+ OptionInfo + OPT_MOVE_TRACKS,
+ OptionInfo + OPT_MOVE1_TRACKS,
+ OptionInfo + OPT_LINK_TRACKS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LPAR[] =
+{
+ OptionInfo + OPT_LE_DEFINE,
+ OptionInfo + OPT_LPAR,
+ OptionInfo + OPT_ALIAS,
+ OptionInfo + OPT_ENGINE,
+ OptionInfo + OPT_200CC,
+ OptionInfo + OPT_PERFMON,
+ OptionInfo + OPT_CUSTOM_TT,
+ OptionInfo + OPT_XPFLAGS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CREATE[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_LPAR,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_COMPLETE,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_ECHO,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_COMPLETE,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_ECHO,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_COMPLETE,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wlect",
+ 0,
+ "wlect [option]... command [option|parameter|file]...",
+ "Wiimms LE-CODE Tool : Manage the LE-CODE and LEX extensions.",
+ 0,
+ 25,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wlect VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wlect HELP [--width=wd] OPT|OPTION ...\n"
+ "wlect HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wlect HELP [--width=wd] command [-b] [ignored]...\n"
+ "wlect HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wlect ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wlect TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 0,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wlect COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wlect ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wlect FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wlect FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wlect SYMBOLS",
+ "Print predefined symbols of text parser to standard output. The"
+ " LE-CODE specific symbols are included.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wlect FUNCTIONS [key]...",
+ "Print a list with all parser functions including the LE-CODE specific"
+ " functions. If one key ore more key entered, then only functions that"
+ " match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wlect CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wlect FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_DUMP,
+ false,
+ false,
+ true,
+ "DUMP",
+ "D",
+ "wlect DUMP [source]...",
+ "Print an information dump for each source file. LE-CODE binaries and"
+ " LEX binaries are accepted as input.",
+ 0,
+ 10,
+ option_tab_cmd_DUMP,
+ option_allowed_cmd_DUMP
+ },
+
+ { CMD_DL,
+ false,
+ false,
+ false,
+ "DL",
+ 0,
+ "wlect DL [source]...",
+ "Short cut for 'DUMP --long'.",
+ 0,
+ 10,
+ option_tab_cmd_DL,
+ option_allowed_cmd_DL
+ },
+
+ { CMD_DLL,
+ false,
+ false,
+ false,
+ "DLL",
+ 0,
+ "wlect DLL [source]...",
+ "Short cut for 'DUMP --long --long'.",
+ 0,
+ 10,
+ option_tab_cmd_DLL,
+ option_allowed_cmd_DLL
+ },
+
+ { CMD_BIN_DIFF,
+ false,
+ false,
+ false,
+ "BIN-DIFF",
+ "BINDIFF",
+ "wlect BIN-DIFF settings binary1 binary2",
+ "Compare parts of 2 different LECODE binary files. SETTINGS is a"
+ " string with plus and minus signs to switch between plus/minus modes,"
+ " and some key letters to select parts: s:size, h:header, t:timestamp,"
+ " b:body, p:parameters, d:data, c:code and a:all. In plus-mode, a test"
+ " is enabled, in minus-mode it is disabled. Scanning starts in"
+ " plus-mode.\n"
+ " Example: a-t: compare all except timestamps.\n"
+ " The exist status is OK (0) if nothing differ, DIFFER (2) if at"
+ " least one test failed, or an error code.",
+ 0,
+ 2,
+ option_tab_cmd_BIN_DIFF,
+ option_allowed_cmd_BIN_DIFF
+ },
+
+ { CMD_PATCH,
+ false,
+ false,
+ false,
+ "PATCH",
+ "P",
+ "wlect PATCH [le_bin]...",
+ "Read each LE-BIN file and patch it. Use --le-define to setup cups and"
+ " tracks.",
+ 0,
+ 22,
+ option_tab_cmd_PATCH,
+ option_allowed_cmd_PATCH
+ },
+
+ { CMD_LPAR,
+ false,
+ false,
+ false,
+ "LPAR",
+ 0,
+ "wlect LPAR [le_bin]...",
+ "Read each LE-BIN file and patch it. Then extract the LE-CODE"
+ " parameters and store them as LPAR text file. Print the result to"
+ " standard output if no other destination is defined.",
+ 0,
+ 20,
+ option_tab_cmd_LPAR,
+ option_allowed_cmd_LPAR
+ },
+
+ { CMD_CREATE,
+ false,
+ false,
+ true,
+ "CREATE",
+ "CR",
+ "wlect CREATE [keyword]",
+ "Create a file and print it to standard output. The kind of file is"
+ " defined by KEYWORD. Use command without keywords to get a list of"
+ " possible keywords.\n"
+ " The following keywords are possible: LEX for a LEX text file with"
+ " all known sections except TEST. LEX+ for a LEX text file with all"
+ " known sections including TEST. SET1, CANN, HIPT and TEST (section"
+ " names) for a LEX text file with 1 section only. LPAR for an example"
+ " LE-CODE parameter file.",
+ 0,
+ 22,
+ option_tab_cmd_CREATE,
+ option_allowed_cmd_CREATE
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ false,
+ "CAT",
+ 0,
+ "wlect CAT [source]...",
+ "Read the entered LEX and LE-CODE files (text, binary or szs) and"
+ " print them as decoded text files to standard output. The output of"
+ " all source files is concatenated.",
+ 0,
+ 6,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wlect DECODE [source]...",
+ "Read the entered LEX files (text or binary) and decode them to text"
+ " files. The default destination is '%P/%N.txt'.",
+ 0,
+ 14,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "ENCODE",
+ "ENC",
+ "wlect ENCODE source...",
+ "Read the entered LEX files (text or binary) and encode (compile) them"
+ " to binary files. The default destination is '%P/%N.lex'.",
+ 0,
+ 11,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wlect =
+{
+ "wlect",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wlect.h b/project/src/ui/ui-wlect.h
new file mode 100644
index 0000000..94a0f2e
--- /dev/null
+++ b/project/src/ui/ui-wlect.h
@@ -0,0 +1,451 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WLECT_H
+#define SZS_UI_WLECT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_EXPORT,
+ OPT_NO_PARAM,
+ OPT_NO_ECHO,
+ OPT_LT_CLEAR,
+ OPT_LT_ONLINE,
+ OPT_LT_N_PLAYERS,
+ OPT_LE_DEFINE,
+ OPT_LPAR,
+ OPT_ALIAS,
+ OPT_ENGINE,
+ OPT_200CC,
+ OPT_PERFMON,
+ OPT_CUSTOM_TT,
+ OPT_XPFLAGS,
+ OPT_TRACK_DIR,
+ OPT_COPY_TRACKS,
+ OPT_MOVE_TRACKS,
+ OPT_MOVE1_TRACKS,
+ OPT_LINK_TRACKS,
+ OPT_COMPLETE,
+ OPT_LOAD_BMG,
+ OPT_PATCH_BMG,
+ OPT_MACRO_BMG,
+ OPT_PATCH_NAMES,
+ OPT_ORDER_BY,
+ OPT_ORDER_ALL,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 41
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_MAX_FILE_SIZE,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_LT_COND_BIT,
+ OPT_LT_GAME_MODE,
+ OPT_LT_ENGINE,
+ OPT_LT_RANDOM,
+ OPT_LEX_PURGE,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 72
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_EXPORT = 1llu << OPT_EXPORT,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_LT_CLEAR = 1llu << OPT_LT_CLEAR,
+// OB_LT_ONLINE = 1llu << OPT_LT_ONLINE,
+// OB_LT_N_PLAYERS = 1llu << OPT_LT_N_PLAYERS,
+// OB_LE_DEFINE = 1llu << OPT_LE_DEFINE,
+// OB_LPAR = 1llu << OPT_LPAR,
+// OB_ALIAS = 1llu << OPT_ALIAS,
+// OB_ENGINE = 1llu << OPT_ENGINE,
+// OB_200CC = 1llu << OPT_200CC,
+// OB_PERFMON = 1llu << OPT_PERFMON,
+// OB_CUSTOM_TT = 1llu << OPT_CUSTOM_TT,
+// OB_XPFLAGS = 1llu << OPT_XPFLAGS,
+// OB_TRACK_DIR = 1llu << OPT_TRACK_DIR,
+// OB_COPY_TRACKS = 1llu << OPT_COPY_TRACKS,
+// OB_MOVE_TRACKS = 1llu << OPT_MOVE_TRACKS,
+// OB_MOVE1_TRACKS = 1llu << OPT_MOVE1_TRACKS,
+// OB_LINK_TRACKS = 1llu << OPT_LINK_TRACKS,
+// OB_COMPLETE = 1llu << OPT_COMPLETE,
+// OB_LOAD_BMG = 1llu << OPT_LOAD_BMG,
+// OB_PATCH_BMG = 1llu << OPT_PATCH_BMG,
+// OB_MACRO_BMG = 1llu << OPT_MACRO_BMG,
+// OB_PATCH_NAMES = 1llu << OPT_PATCH_NAMES,
+// OB_ORDER_BY = 1llu << OPT_ORDER_BY,
+// OB_ORDER_ALL = 1llu << OPT_ORDER_ALL,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_PATCH = OB_LE_DEFINE
+// | OB_LPAR
+// | OB_ALIAS
+// | OB_ENGINE
+// | OB_200CC
+// | OB_PERFMON
+// | OB_CUSTOM_TT
+// | OB_XPFLAGS,
+//
+// OB_GRP_TRACK_COPY = OB_TRACK_DIR
+// | OB_COPY_TRACKS
+// | OB_MOVE_TRACKS
+// | OB_MOVE1_TRACKS
+// | OB_LINK_TRACKS,
+//
+// OB_GRP_TEXTOPT = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_EXPORT,
+//
+// OB_GRP_TEXTOUT = OB_IGNORE
+// | OB_GRP_TEXTOPT,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_DUMP = OB_GRP_PATCH
+// | OB_LONG
+// | OB_GRP_PATCH,
+//
+// OB_CMD_DL = OB_CMD_DUMP,
+//
+// OB_CMD_DLL = OB_CMD_DUMP,
+//
+// OB_CMD_BIN_DIFF = 0,
+//
+// OB_CMD_PATCH = OB_GRP_PATCH
+// | OB_GRP_TRACK_COPY
+// | OB_GRP_DEST
+// | OB_IGNORE,
+//
+// OB_CMD_LPAR = OB_GRP_PATCH
+// | OB_GRP_DEST
+// | OB_GRP_TEXTOUT,
+//
+// OB_CMD_CREATE = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_GRP_DEST
+// | OB_LPAR
+// | OB_LT_CLEAR
+// | OB_LT_ONLINE
+// | OB_LT_N_PLAYERS,
+//
+// OB_CMD_CAT = OB_COMPLETE
+// | OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_IGNORE,
+//
+// OB_CMD_DECODE = OB_COMPLETE
+// | OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_IGNORE,
+//
+// OB_CMD_ENCODE = OB_COMPLETE
+// | OB_GRP_DEST
+// | OB_NO_ECHO
+// | OB_IGNORE,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_FLOAT,
+ CMD_EXPORT,
+
+ CMD_DUMP,
+ CMD_DL,
+ CMD_DLL,
+ CMD_BIN_DIFF,
+ CMD_PATCH,
+ CMD_LPAR,
+
+ CMD_CREATE,
+ CMD_CAT,
+ CMD_DECODE,
+ CMD_ENCODE,
+
+
+ CMD__N // == 24
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_BRIEF = 'B',
+ GO_COMPLETE = 'C',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_PARAM = 'P',
+ GO_VERSION = 'V',
+ GO_EXPORT = 'X',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_ROUND,
+ GO_NO_ECHO,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_LT_CLEAR,
+ GO_LT_ONLINE,
+ GO_LT_N_PLAYERS,
+ GO_LT_COND_BIT,
+ GO_LT_GAME_MODE,
+ GO_LT_ENGINE,
+ GO_LT_RANDOM,
+ GO_LEX_PURGE,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_LE_DEFINE,
+ GO_LPAR,
+ GO_ALIAS,
+ GO_ENGINE,
+ GO_200CC,
+ GO_PERFMON,
+ GO_CUSTOM_TT,
+ GO_XPFLAGS,
+ GO_TRACK_DIR,
+ GO_COPY_TRACKS,
+ GO_MOVE_TRACKS,
+ GO_MOVE1_TRACKS,
+ GO_LINK_TRACKS,
+ GO_LOAD_BMG,
+ GO_PATCH_BMG,
+ GO_MACRO_BMG,
+ GO_PATCH_NAMES,
+ GO_ORDER_BY,
+ GO_ORDER_ALL,
+ GO_NUMBER,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wlect;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WLECT_H
+
diff --git a/project/src/ui/ui-wmdlt.c b/project/src/ui/ui-wmdlt.c
new file mode 100644
index 0000000..15be6fc
--- /dev/null
+++ b/project/src/ui/ui-wmdlt.c
@@ -0,0 +1,1756 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wmdlt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_SCALE, false, false, false, false, false, 0, "scale",
+ "vector[@origin]",
+ "Transform the data: Scale all coordinates and size values by 'vector'"
+ " relative to the point 'origin'. If the origin is not set, 0,0,0 is"
+ " used instead.\n"
+ " Negative values mirror the coordinates. Each parameter is either a"
+ " vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_SHIFT, false, false, false, false, false, 0, "shift",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --translate, but the addition is done before rotation. The parameter"
+ " is either a vector expression or a comma separated expression list"
+ " of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_XSS, false, false, false, false, false, 0, "xss",
+ "x1old,x1new,x2old,x2new",
+ "--xss (x-scale-shift) calculates the X values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_YSS, false, false, false, false, false, 0, "yss",
+ "y1old,y1new,y2old,y2new",
+ "--yss (y-scale-shift) calculates the Y values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ZSS, false, false, false, false, false, 0, "zss",
+ "z1old,z1new,z2old,z2new",
+ "--zss (z-scale-shift) calculates the Z values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ROT, false, false, false, false, false, 0, "rot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes"
+ " through the point 'origin'. If the origin is not set, 0,0,0 is used"
+ " instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y,z').\n"
+ " Option --rot is an alternative for --xrot, --yrot and --zrot to"
+ " define all 3 rotations in one step. Transformations are calculated"
+ " in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_XROT, false, false, false, false, false, 0, "xrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('y,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_YROT, false, false, false, false, false, 0, "yrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead. This is a"
+ " horizontal counterclockwise rotation and the old option name --hrot"
+ " can also used.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_ZROT, false, false, false, false, false, 0, "zrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the z-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_TRANSLATE, false, false, false, false, false, 0, "translate",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --shift, but the addition is done after rotation. The parameter is"
+ " either a vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z'). --trans is a short cut.\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_NULL, false, false, false, false, false, 0, "null",
+ 0,
+ "Create a neutral transformation without affecting the coordinates."
+ " The only influence is, that the dependent values (like maximum) are"
+ " re-calculated as if a transformation has taken place."
+ },
+
+ { OPT_NEXT, false, false, false, false, false, 0, "next",
+ 0,
+ "Close the current transformation step with all scaling, shifting,"
+ " rotation and translation options and open a new step with cleared"
+ " options. On transformation each step is logical done one by one. In"
+ " real, one total transformation matrix is calculated and used for"
+ " fast transformations.\n"
+ " If option --next is used, the ability for modifying the scale and"
+ " rotation vectors (not the positions) of different KMP sections is"
+ " nearly always lost. A warning is printed if this occurs."
+ },
+
+ { OPT_ASCALE, false, false, false, false, false, 0, "ascale",
+ "factor@dir",
+ "Transform the data and do an axis scale: Close the current"
+ " transformation step like --next and scale the data by 'factor' into"
+ " the direction given by the vector 'dir'. Store the resulting matrix"
+ " as single transformation step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_AROT, false, false, false, false, false, 0, "arot",
+ "degree[@pos1]@pos2",
+ "Transform the data and do an axis rotation: Close the current"
+ " transformation step like --next and rotate the data by 'degree'"
+ " around the axis defined by the 2 points. If 'pos1' is not set, use"
+ " 0,0,0 instead. Store the resulting matrix as single transformation"
+ " step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_TFORM_SCRIPT, false, false, false, false, false, 0, "tform-script",
+ "script",
+ "Load the script and execute it by the text parser.\n"
+ " Then for each coordinate (2D and 3D), call the macro TRANSFORM after"
+ " all other transformations. Call it without parameters and set"
+ " variable $I with a zero based index of all vertices, variable $D to"
+ " the dimension (2 or 3) and the variable $P to the vector of the"
+ " current vertex. If the macro returns a vector, it is the new"
+ " position.\n"
+ " For each file, macro BEGIN is called at the beginning and END after"
+ " processing all points, but only, if the macros are defined. For END,"
+ " variable $I is set to the number of processed vertices in the"
+ " current file.\n"
+ " Before each macro call, the private and local variables are cleared"
+ " and only global parameters are permanent. The zero based index is"
+ " cleared for each new source. The parameters of the macro calls are"
+ " defined in the local name space."
+ },
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress cross reference comments."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Do not make plausibility checks for KMP files."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 33
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "This option is completely ignored by wlect. It only exists due to"
+ " compatibility with the other tools."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_MDL, false, false, false, false, false, 0, "mdl",
+ "list",
+ "Set global options for MDL processing. To enable MDL patching, use"
+ " option --patch-file and select BRRES files for patching.\n"
+ " Parameter 'list' is a comma separated list of keywords. A minus"
+ " sign before a keyword disables a setting. Each occurrence of the"
+ " option will only change entered settings and all other settings are"
+ " untouched.\n"
+ " A MDL transformation (controlled by the transformation options) is"
+ " only done, if at least one of the keywords VECTOR or VERTEX is set.\n"
+ " Keyword DEFAULT resets the default settings (VERTEX) and CLEAR"
+ " disables all. The other allowed keywords are: VECTOR, MATRIX,"
+ " VERTEX, PARENT, CHILD and LOG. See https://szs.wiimm.de/opt/mdl for"
+ " details."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, true, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, true, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_TINY, false, false, false, false, false, 0, "tiny",
+ "mode",
+ "Set tiny mode to a level between 0 and 7. See"
+ " https://szs.wiimm.de/opt/tiny for details."
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 63
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOUT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in MDL text files."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_TEST_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Print the matrices of transformations."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set once, suppress vector dumps for transformation steps and"
+ " ignore option --long. If set twice, suppress vector dump for final"
+ " transformation too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set once, print inverse matrix for the final transformation. If"
+ " set twice, print inverse matrix for all transformations."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Option --quiet is dedicated to automatic tests comparing the old and"
+ " new transformation algorithms. If set once, the tables are only"
+ " printed, if the results differ. If set twice, nothing is printed at"
+ " all and only the exit status will inform about the results."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_MATRIX, "MATRIX", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+ { CMD_STRINGS, "STRINGS", 0, 0 },
+ { CMD_GEOMETRY, "GEOMETRY", "GEO", 0 },
+ { CMD_XTEST, "_TEST", 0, 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHBPNM:T:A:td:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "mdl", 1, 0, GO_MDL },
+ { "scale", 1, 0, GO_SCALE },
+ { "shift", 1, 0, GO_SHIFT },
+ { "xss", 1, 0, GO_XSS },
+ { "yss", 1, 0, GO_YSS },
+ { "zss", 1, 0, GO_ZSS },
+ { "rot", 1, 0, GO_ROT },
+ { "xrot", 1, 0, GO_XROT },
+ { "yrot", 1, 0, GO_YROT },
+ { "hrot", 1, 0, GO_YROT },
+ { "zrot", 1, 0, GO_ZROT },
+ { "translate", 1, 0, GO_TRANSLATE },
+ { "null", 0, 0, GO_NULL },
+ { "next", 0, 0, GO_NEXT },
+ { "ascale", 1, 0, GO_ASCALE },
+ { "arot", 1, 0, GO_AROT },
+ { "tform-script", 1, 0, GO_TFORM_SCRIPT },
+ { "tformscript", 1, 0, GO_TFORM_SCRIPT },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "no-check", 0, 0, 'N' },
+ { "nocheck", 0, 0, 'N' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "tiny", 1, 0, GO_TINY },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 */ 0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e N */ OPT_NO_CHECK,
+ /* 0x04f */ 0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_MDL,
+ /* 0x08b */ OPT_SCALE,
+ /* 0x08c */ OPT_SHIFT,
+ /* 0x08d */ OPT_XSS,
+ /* 0x08e */ OPT_YSS,
+ /* 0x08f */ OPT_ZSS,
+ /* 0x090 */ OPT_ROT,
+ /* 0x091 */ OPT_XROT,
+ /* 0x092 */ OPT_YROT,
+ /* 0x093 */ OPT_ZROT,
+ /* 0x094 */ OPT_TRANSLATE,
+ /* 0x095 */ OPT_NULL,
+ /* 0x096 */ OPT_NEXT,
+ /* 0x097 */ OPT_ASCALE,
+ /* 0x098 */ OPT_AROT,
+ /* 0x099 */ OPT_TFORM_SCRIPT,
+ /* 0x09a */ OPT_ROUND,
+ /* 0x09b */ OPT_NO_ECHO,
+ /* 0x09c */ OPT_UTF_8,
+ /* 0x09d */ OPT_NO_UTF_8,
+ /* 0x09e */ OPT_FORCE,
+ /* 0x09f */ OPT_REPAIR_MAGICS,
+ /* 0x0a0 */ OPT_TINY,
+ /* 0x0a1 */ OPT_OLD,
+ /* 0x0a2 */ OPT_STD,
+ /* 0x0a3 */ OPT_NEW,
+ /* 0x0a4 */ OPT_EXTRACT,
+ /* 0x0a5 */ OPT_NUMBER,
+ /* 0x0a6 */ OPT_SECTIONS,
+ /* 0x0a7 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x0b0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[33] = // cmd #1
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,1
+};
+
+static u8 option_allowed_cmd_HELP[33] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1
+};
+
+static u8 option_allowed_cmd_ARGTEST[33] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1
+};
+
+static u8 option_allowed_cmd_TEST[33] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1
+};
+
+static u8 option_allowed_cmd_COLORS[33] = // cmd #5
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_ERROR[33] = // cmd #6
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,1
+};
+
+static u8 option_allowed_cmd_FILETYPE[33] = // cmd #7
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[33] = // cmd #8
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[33] = // cmd #9
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[33] = // cmd #10
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_CALCULATE[33] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_MATRIX[33] = // cmd #12
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_FLOAT[33] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_EXPORT[33] = // cmd #14
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0
+};
+
+static u8 option_allowed_cmd_CAT[33] = // cmd #15
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,1,0
+};
+
+static u8 option_allowed_cmd_DECODE[33] = // cmd #16
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,1,1, 0,1,1,1,1, 1,1,1,1,1,
+ 1,1,0
+};
+
+static u8 option_allowed_cmd_ENCODE[33] = // cmd #17
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1, 1,1,1,1,1,
+ 1,1,0
+};
+
+static u8 option_allowed_cmd_STRINGS[33] = // cmd #18
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,1,0
+};
+
+static u8 option_allowed_cmd_GEOMETRY[33] = // cmd #19
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,1,0
+};
+
+static u8 option_allowed_cmd_XTEST[33] = // cmd #20
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,1,0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+ OptionInfo + OPT_TINY,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+ &option_cmd_TEST_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MATRIX[] =
+{
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_MATRIX_BRIEF,
+ &option_cmd_MATRIX_LONG,
+ &option_cmd_MATRIX_QUIET,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_STRINGS[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_GEOMETRY[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_XTEST[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_MDL,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wmdlt",
+ 0,
+ "wmdlt [option]... command [option|parameter|file]...",
+ "Wiimms MDL Tool : Decode raw MDL and encode text MDL files.",
+ 0,
+ 22,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wmdlt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wmdlt HELP [--width=wd] OPT|OPTION ...\n"
+ "wmdlt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wmdlt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wmdlt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wmdlt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wmdlt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 1,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wmdlt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wmdlt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wmdlt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wmdlt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wmdlt SYMBOLS",
+ "Print predefined symbols of text parser to standard output. The MDL"
+ " specific symbols are included.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wmdlt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the MDL specific"
+ " functions. If one key ore more key entered, then only functions that"
+ " match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wmdlt CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_MATRIX,
+ false,
+ false,
+ false,
+ "MATRIX",
+ 0,
+ "wmdlt MATRIX [patch-option]... [vector]...",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results.",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results. The transformations are done with 4"
+ " different methods to confirm the algorithms. Only the main results"
+ " and results, which differ, are printed.\n"
+ " Normally, the exit status is OK (null). If at least one old"
+ " transformation returns different results for the different"
+ " algorithms, then status DIFFER (not null) is returned.",
+ 19,
+ option_tab_cmd_MATRIX,
+ option_allowed_cmd_MATRIX
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wmdlt FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ true,
+ "CAT",
+ 0,
+ "wmdlt CAT [source]...",
+ "Read the entered MDL files (text or binary) and print them as decoded"
+ " text files to standard output (stdout). The output of all source"
+ " files is concatenated.\n"
+ " A decoded MDL0 file can only be used for analysis. Encoding or"
+ " creating a new MDL0 file is not supported.",
+ 0,
+ 21,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wmdlt DECODE [source]...",
+ "Read the entered MDL files (text or binary) and decode them to text"
+ " files. The default destination is '%P/%N.txt'.\n"
+ " A decoded MDL0 file can only be used for analysis. Encoding or"
+ " creating a new MDL0 file is not supported.",
+ 0,
+ 29,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ true,
+ false,
+ false,
+ "ENCODE",
+ "ENC",
+ "wmdlt ENCODE [source]...",
+ "Read the entered MDL files (text or binary) and encode (compile) them"
+ " to binary files. The default destination is '%P/%N.mdl'.",
+ 0,
+ 27,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ { CMD_STRINGS,
+ false,
+ false,
+ true,
+ "STRINGS",
+ 0,
+ "wmdlt STRINGS [source]...",
+ "Read the entered MDL files (text or binary) and print all strings of"
+ " all sections.\n"
+ " For archives like SZS or BREES, the strings of each containing MDL"
+ " are printed. It is also possible to address an internal sub-file"
+ " like track.szs/course_model.brres.",
+ 0,
+ 21,
+ option_tab_cmd_STRINGS,
+ option_allowed_cmd_STRINGS
+ },
+
+ { CMD_GEOMETRY,
+ true,
+ false,
+ false,
+ "GEOMETRY",
+ "GEO",
+ "wmdlt GEOMETRY [source]...",
+ "Read the entered MDL files (text or binary) and print some geometry"
+ " information to the standard output (stdout). The output of all"
+ " source files is concatenated.",
+ 0,
+ 21,
+ option_tab_cmd_GEOMETRY,
+ option_allowed_cmd_GEOMETRY
+ },
+
+ { CMD_XTEST,
+ true,
+ false,
+ false,
+ "_TEST",
+ 0,
+ "wszst _TEST [files]",
+ "Test something.",
+ 0,
+ 21,
+ option_tab_cmd_XTEST,
+ option_allowed_cmd_XTEST
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wmdlt =
+{
+ "wmdlt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wmdlt.h b/project/src/ui/ui-wmdlt.h
new file mode 100644
index 0000000..7bca204
--- /dev/null
+++ b/project/src/ui/ui-wmdlt.h
@@ -0,0 +1,417 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WMDLT_H
+#define SZS_UI_WMDLT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_SCALE,
+ OPT_SHIFT,
+ OPT_XSS,
+ OPT_YSS,
+ OPT_ZSS,
+ OPT_ROT,
+ OPT_XROT,
+ OPT_YROT,
+ OPT_ZROT,
+ OPT_TRANSLATE,
+ OPT_NULL,
+ OPT_NEXT,
+ OPT_ASCALE,
+ OPT_AROT,
+ OPT_TFORM_SCRIPT,
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_NO_PARAM,
+ OPT_NO_ECHO,
+ OPT_NO_CHECK,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 33
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_MDL,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_TINY,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 63
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_SCALE = 1llu << OPT_SCALE,
+// OB_SHIFT = 1llu << OPT_SHIFT,
+// OB_XSS = 1llu << OPT_XSS,
+// OB_YSS = 1llu << OPT_YSS,
+// OB_ZSS = 1llu << OPT_ZSS,
+// OB_ROT = 1llu << OPT_ROT,
+// OB_XROT = 1llu << OPT_XROT,
+// OB_YROT = 1llu << OPT_YROT,
+// OB_ZROT = 1llu << OPT_ZROT,
+// OB_TRANSLATE = 1llu << OPT_TRANSLATE,
+// OB_NULL = 1llu << OPT_NULL,
+// OB_NEXT = 1llu << OPT_NEXT,
+// OB_ASCALE = 1llu << OPT_ASCALE,
+// OB_AROT = 1llu << OPT_AROT,
+// OB_TFORM_SCRIPT = 1llu << OPT_TFORM_SCRIPT,
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_NO_CHECK = 1llu << OPT_NO_CHECK,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_TRANSFORM = OB_SCALE
+// | OB_SHIFT
+// | OB_XSS
+// | OB_YSS
+// | OB_ZSS
+// | OB_ROT
+// | OB_XROT
+// | OB_YROT
+// | OB_ZROT
+// | OB_TRANSLATE
+// | OB_NULL
+// | OB_ASCALE
+// | OB_AROT
+// | OB_TFORM_SCRIPT
+// | OB_NEXT,
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_TEXTOUT = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_MATRIX = OB_GRP_TRANSFORM
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_CAT = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_ENCODE = OB_GRP_DEST
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_STRINGS = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_GEOMETRY = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_XTEST = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE
+// | OB_GRP_TRANSFORM,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_MATRIX,
+ CMD_FLOAT,
+ CMD_EXPORT,
+
+ CMD_CAT,
+ CMD_DECODE,
+ CMD_ENCODE,
+
+ CMD_STRINGS,
+ CMD_GEOMETRY,
+ CMD_XTEST,
+
+ CMD__N // == 21
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_CHECK = 'N',
+ GO_NO_PARAM = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_MDL,
+ GO_SCALE,
+ GO_SHIFT,
+ GO_XSS,
+ GO_YSS,
+ GO_ZSS,
+ GO_ROT,
+ GO_XROT,
+ GO_YROT,
+ GO_ZROT,
+ GO_TRANSLATE,
+ GO_NULL,
+ GO_NEXT,
+ GO_ASCALE,
+ GO_AROT,
+ GO_TFORM_SCRIPT,
+ GO_ROUND,
+ GO_NO_ECHO,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_TINY,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wmdlt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WMDLT_H
+
diff --git a/project/src/ui/ui-wpatt.c b/project/src/ui/ui-wpatt.c
new file mode 100644
index 0000000..4d27f28
--- /dev/null
+++ b/project/src/ui/ui-wpatt.c
@@ -0,0 +1,1228 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wpatt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress cross reference comments."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Do not make plausibility checks for KMP files."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 18
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "This option is completely ignored by wlect. It only exists due to"
+ " compatibility with the other tools."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, true, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, true, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_PAT, false, false, false, false, false, 0, "pat",
+ "list",
+ "Set global options for PAT processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " The other allowed keywords are: AUTO, SIMPLE, COMPLEX, BOTH, SILENT"
+ " and LOG. See https://szs.wiimm.de/opt/pat for details."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 47
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOUT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in PAT text files."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_DECODE, "DECODE", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "ENC", 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHBPNM:T:A:td:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "no-check", 0, 0, 'N' },
+ { "nocheck", 0, 0, 'N' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "pat", 1, 0, GO_PAT },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 */ 0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e N */ OPT_NO_CHECK,
+ /* 0x04f */ 0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,0,0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_ROUND,
+ /* 0x08b */ OPT_NO_ECHO,
+ /* 0x08c */ OPT_PAT,
+ /* 0x08d */ OPT_UTF_8,
+ /* 0x08e */ OPT_NO_UTF_8,
+ /* 0x08f */ OPT_FORCE,
+ /* 0x090 */ OPT_REPAIR_MAGICS,
+ /* 0x091 */ OPT_OLD,
+ /* 0x092 */ OPT_STD,
+ /* 0x093 */ OPT_NEW,
+ /* 0x094 */ OPT_EXTRACT,
+ /* 0x095 */ OPT_NUMBER,
+ /* 0x096 */ OPT_SECTIONS,
+ /* 0x097 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x0a0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0b0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[18] = // cmd #1
+{
+ 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,1
+};
+
+static u8 option_allowed_cmd_HELP[18] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1
+};
+
+static u8 option_allowed_cmd_ARGTEST[18] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1
+};
+
+static u8 option_allowed_cmd_TEST[18] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1
+};
+
+static u8 option_allowed_cmd_COLORS[18] = // cmd #5
+{
+ 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_ERROR[18] = // cmd #6
+{
+ 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,1
+};
+
+static u8 option_allowed_cmd_FILETYPE[18] = // cmd #7
+{
+ 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[18] = // cmd #8
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[18] = // cmd #9
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[18] = // cmd #10
+{
+ 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_CALCULATE[18] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_FLOAT[18] = // cmd #12
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_EXPORT[18] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0
+};
+
+static u8 option_allowed_cmd_CAT[18] = // cmd #14
+{
+ 0,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0, 0,1,0
+};
+
+static u8 option_allowed_cmd_DECODE[18] = // cmd #15
+{
+ 0,0,0,1,1, 0,1,1,1,1, 1,1,1,1,1, 1,1,0
+};
+
+static u8 option_allowed_cmd_ENCODE[18] = // cmd #16
+{
+ 0,0,0,0,0, 0,1,1,1,1, 1,1,1,1,1, 1,1,0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+ OptionInfo + OPT_PAT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+ OptionInfo + OPT_PAT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+ OptionInfo + OPT_PAT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wpatt",
+ 0,
+ "wpatt [option]... command [option|parameter|file]...",
+ "Wiimms PAT Tool : Decode raw PAT and encode text PAT files.",
+ 0,
+ 21,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wpatt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wpatt HELP [--width=wd] OPT|OPTION ...\n"
+ "wpatt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wpatt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wpatt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wpatt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wpatt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 0,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wpatt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wpatt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wpatt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wpatt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wpatt SYMBOLS",
+ "Print predefined symbols of text parser to standard output. The PAT"
+ " specific symbols are included.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wpatt FUNCTIONS [key]...",
+ "Print a list with all parser functions including the PAT specific"
+ " functions. If one key ore more key entered, then only functions that"
+ " match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wpatt CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wpatt FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ true,
+ "CAT",
+ 0,
+ "wpatt CAT [source]...",
+ "Read the entered PAT files (text or binary) and print them as decoded"
+ " text files to standard output (stdout). The output of all source"
+ " files is concatenated.",
+ 0,
+ 5,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_DECODE,
+ false,
+ false,
+ false,
+ "DECODE",
+ "DEC",
+ "wpatt DECODE [source]...",
+ "Read the entered PAT files (text or binary) and decode them to text"
+ " files. The default destination is '%P/%N.txt'.",
+ 0,
+ 14,
+ option_tab_cmd_DECODE,
+ option_allowed_cmd_DECODE
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "ENCODE",
+ "ENC",
+ "wpatt ENCODE [source]...",
+ "Read the entered PAT files (text or binary) and encode (compile) them"
+ " to binary files. The default destination is '%P/%N.pat'.",
+ 0,
+ 12,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wpatt =
+{
+ "wpatt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wpatt.h b/project/src/ui/ui-wpatt.h
new file mode 100644
index 0000000..89befd5
--- /dev/null
+++ b/project/src/ui/ui-wpatt.h
@@ -0,0 +1,324 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WPATT_H
+#define SZS_UI_WPATT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_NO_PARAM,
+ OPT_NO_ECHO,
+ OPT_NO_CHECK,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 18
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_PAT,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 47
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_NO_CHECK = 1llu << OPT_NO_CHECK,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_TEXTOUT = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_CAT = OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE,
+//
+// OB_CMD_DECODE = OB_GRP_DEST
+// | OB_GRP_TEXTOUT
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE,
+//
+// OB_CMD_ENCODE = OB_GRP_DEST
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_IGNORE,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_FLOAT,
+ CMD_EXPORT,
+
+ CMD_CAT,
+ CMD_DECODE,
+ CMD_ENCODE,
+
+ CMD__N // == 17
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_CHECK = 'N',
+ GO_NO_PARAM = 'P',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_ROUND,
+ GO_NO_ECHO,
+ GO_PAT,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wpatt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WPATT_H
+
diff --git a/project/src/ui/ui-wstrt.c b/project/src/ui/ui-wstrt.c
new file mode 100644
index 0000000..463ab65
--- /dev/null
+++ b/project/src/ui/ui-wstrt.c
@@ -0,0 +1,2207 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wstrt.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "List only the track file names and suppress table header and footer."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in BMG text files."
+ },
+
+ { OPT_CHEAT, false, true, false, false, false, 0, "cheat",
+ "region",
+ "Change the output format and create a cheat code for the region."
+ " Allowed keywords: JAPAN; AMERICA, NTSC; EUROPE, AUSTRALIA, PAL;"
+ " KOREA."
+ },
+
+ { OPT_ADD_WCODE, false, true, false, false, false, 0, "@add-wcode",
+ "file",
+ "Each option call adds the filename to an internal list. Each file"
+ " must be of type GCT and is added to the internal wcode stock.\n"
+ " If a single file is not found and the filename (not path) contains"
+ " at least 1 '@' character, then all '@' characters of it are replaced"
+ " by the region code (one of P,E,J,K) for a second try."
+ },
+
+ { OPT_DEST, false, false, false, false, true, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_ADD_LECODE, false, true, false, false, false, 0, "add-lecode",
+ 0,
+ "Add LE-CODE starter to main.dol."
+ },
+
+ { OPT_ADD_CTCODE, false, false, false, false, false, 0, "add-ctcode",
+ 0,
+ "If source is an original main.dol file of MKWii, then append 2"
+ " sections (usually T2 and D8) with CT-CODE. The CTCODE is inserted"
+ " after sections defined by --add-section and then only, if there are"
+ " no address collisions.\n"
+ " If --ct-dir is used, then files named rmc[ejp]/boot_code.bin and"
+ " boot_code.bin for T2, and rmc[ejp]/boot_data.bin and boot_data.bin"
+ " for D8 are searched."
+ },
+
+ { OPT_MOVE_D8, false, false, false, false, false, 0, "move-d8",
+ 0,
+ "Move the CT-CODE section D8 to another place at the middle of binary."
+ " It is done automatically, if the original place overlaps other"
+ " existing sections."
+ },
+
+ { OPT_ADD_SECTION, false, false, false, false, false, 0, "add-section",
+ "file",
+ "Each option call adds the filename to an internal list. Each file"
+ " must be of type GCT, GCH or WCH. All GCT files together are combined"
+ " with an internal code handler to one section (like a GCH file). GCH"
+ " and WCH define sections and patches. The defined sections are added"
+ " and VBI hooks are optionally initialized. Use option --force to"
+ " allow overlapped sections. Use option --verbose up to 2 times for a"
+ " log.\n"
+ " If a single file is not found and the filename (not path) contains"
+ " at least 1 '@' character, then all '@' characters of it are replaced"
+ " by the region code (one of P,E,J,K) for a second try.\n"
+ " The intention of this option is to add a Gecko Code Handler and"
+ " cheat codes to a main.dol for automatic execution. See"
+ " https://szs.wiimm.de/doc/addsect for details."
+ },
+
+ { OPT_FULL_GCH, false, true, false, false, false, 0, "full-gch",
+ 0,
+ "Use the full 'codehandler' instead of 'codehandleronly'."
+ },
+
+ { OPT_GCT_NO_SEP, false, true, false, false, false, 0, "gct-no-sep",
+ 0,
+ "Ignore cheat code separators completly and don't filter 'F0000001"
+ " 0000xxxx' codes. Options --gct-sep and --gct-asm-sep are ignored"
+ " too."
+ },
+
+ { OPT_GCT_SEP, false, true, false, false, false, 0, "gct-sep",
+ 0,
+ "Detect and remove cheat code separators of format 'F0000001"
+ " 0000xxxx'. The separators are used to split the cheat codes into"
+ " several blocks if the total size is too large. ASM blocks are"
+ " skipped if searching separators."
+ },
+
+ { OPT_GCT_ASM_SEP, false, true, false, false, false, 0, "gct-asm-sep",
+ 0,
+ "Detect the beginning of ASM blocks and use them as cheat code"
+ " separators. The separators are used to split the cheat codes into"
+ " several blocks if the total size is too large."
+ },
+
+ { OPT_GCT_LIST, false, true, false, false, false, 0, "gct-list",
+ 0,
+ "If GCT separators active, print a summary table about the"
+ " distribution of the segments. Be more verbose if set twice."
+ },
+
+ { OPT_GCT_MOVE, true, false, false, false, false, 0, "gct-move",
+ "[=mode]",
+ "If a section is of type gecko code handler + cheat code, then make"
+ " the heap smaller and move the cheat codes before the FST section.\n"
+ " Parameter MODE is optional. If set, OFF disables and ON enables"
+ " this feature. For mode AUTO (default) this feature is enabled, if"
+ " the cheat codes are too large or for internal reasons."
+ },
+
+ { OPT_GCT_ADDR, false, false, false, false, false, 0, "gct-addr",
+ "address",
+ "If --gct-move is active, a text section is created to manage the code"
+ " handling. This section is only needed at start and is placed by"
+ " default at address 0c802c0000 (good address for all 4 regions) as"
+ " part of BSS. This option changes the start address of the section."
+ " If address is 0 or invalid, then unused BSS space is searched."
+ },
+
+ { OPT_GCT_SPACE, false, false, false, false, false, 0, "gct-space",
+ "size",
+ "Define the minimal space for the code part of --gct-move. This value"
+ " is ignored, if it is smaller than the size of the cheat codes. This"
+ " option was only implemented to test the memory allocation by"
+ " --gct-move with large blocks."
+ },
+
+ { OPT_ALLOW_USER_GCH, true, false, false, false, false, 0, "allow-user-gch",
+ "[=mode]",
+ " This option is only relevant, if main.dol is patched for wiimmfi.de."
+ " It is dedicated to custom distribution creators for test purposes."
+ " If enabled, a user can load an own instance of Gecko Code Handler"
+ " and cheat codes and can use them online. If disabled, pachcing for"
+ " online modus is disabled if an alternative Gecko Code Handler is"
+ " detected.\n"
+ " Parameter MODE is optional. If set, OFF disables and ON enables"
+ " this feature. For mode AUTO (default) it depends on other options."
+ },
+
+ { OPT_CREATE_SECT, false, true, false, false, false, 0, "create-sect",
+ "mode=file",
+ "Create a new DOL section by loading the binary file. MODE is a list"
+ " of 'P' (parameter support), 'T' or 'D' with optional digit (define"
+ " section) and an address (auto if not set). The parts are separated"
+ " by spaces or commas.\n"
+ " If MODE is 'P', then 4 32-bit parameters are expected at offset"
+ " 0x10: The section address at 0x10 (read), the relative entry point"
+ " at 0x14 (read, used if >0), the original DOL entry point at 0x18"
+ " (written), the address of the last defined '.dol' section at 0x1c"
+ " (written).\n"
+ " If the file name is '.dol', then it points not to a file. Instead a"
+ " copy of the DOL header beginning with the section addresses and"
+ " ending behind the entry point (156B total) is copied. MODE 'P' is"
+ " ignored for this section. All other MODE 'P' sections are updated at"
+ " offset 0x1c.\n"
+ " --cs is a short cut."
+ },
+
+ { OPT_WPF, false, true, false, false, false, 0, "wpf",
+ "file",
+ "Each option call adds the filename to an internal list. Each file"
+ " must be of type WPF (Wiimms Patch File) and defines a list of"
+ " conditionals and patches for staticr.rel and main.dol."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ { OPT_VADDR, false, false, false, false, true, 0, "vaddr",
+ "RANGE",
+ "Comma separated list of virtual addresses to select the hex-dump"
+ " ranges. Each element is either ADDRESS (1 byte) or START:END or"
+ " START#SIZE."
+ },
+
+ { OPT_FADDR, false, false, false, false, false, 0, "faddr",
+ "RANGE",
+ "Comma separated list of file addresses to select the hex-dump ranges."
+ " Each element is either ADDRESS (1 byte) or START:END or START#SIZE."
+ },
+
+ { OPT_SNAME, false, false, false, false, false, 0, "sname",
+ "LIST",
+ "Comma separated list of section names to select the hex-dump ranges."
+ },
+
+ { OPT_INT1, false, false, false, false, true, 0, "i1",
+ 0,
+ "Format: Print single bytes as integer number (default)."
+ },
+
+ { OPT_INT2, false, false, false, false, false, 0, "i2",
+ 0,
+ "Format: Print each 2 bytes as integer number."
+ },
+
+ { OPT_INT3, false, false, false, false, false, 0, "i3",
+ 0,
+ "Format: Print each 3 bytes as integer number."
+ },
+
+ { OPT_INT4, false, false, false, false, false, 0, "i4",
+ 0,
+ "Format: Print each 4 bytes as integer number."
+ },
+
+ { OPT_INT5, false, false, false, false, false, 0, "i5",
+ 0,
+ "Format: Print each 5 bytes as integer number."
+ },
+
+ { OPT_INT6, false, false, false, false, false, 0, "i6",
+ 0,
+ "Format: Print each 6 bytes as integer number."
+ },
+
+ { OPT_INT7, false, false, false, false, false, 0, "i7",
+ 0,
+ "Format: Print each 7 bytes as integer number."
+ },
+
+ { OPT_INT8, false, false, false, false, false, 0, "i8",
+ 0,
+ "Format: Print each 8 bytes as integer number."
+ },
+
+ { OPT_FLOAT, false, false, false, false, false, 0, "float",
+ 0,
+ "Format: Print each 4 bytes as floating point number."
+ },
+
+ { OPT_DOUBLE, false, false, false, false, false, 0, "double",
+ 0,
+ "Format: Print each 8 bytes as double floating point number."
+ },
+
+ { OPT_LE, false, false, false, false, false, 0, "le",
+ 0,
+ "Use little endian for binary data."
+ },
+
+ { OPT_BE, false, false, false, false, false, 0, "be",
+ 0,
+ "Use big endian for binary data (default)."
+ },
+
+ { OPT_ZEROS, false, false, false, false, false, 0, "zeros",
+ 0,
+ "Print integer numbers with leading zeros."
+ },
+
+ { OPT_HEX, false, false, false, false, false, 0, "hex",
+ 0,
+ "Print integer numbers as hexadecimal numbers (default)."
+ },
+
+ { OPT_DEC, false, false, false, false, false, 0, "dec",
+ 0,
+ "Print integer numbers as decimal numbers."
+ },
+
+ { OPT_C_SYNTAX, false, false, false, false, false, 0, "c-syntax",
+ 0,
+ "Print output in `C' syntax."
+ },
+
+ { OPT_ADDR, false, false, false, false, false, 0, "address",
+ "addr",
+ "Use ADDR instead of null as start address for the dump."
+ },
+
+ { OPT_ALIGN, false, false, false, false, false, 0, "align",
+ 0,
+ "Try to align the dump, so that the addresses (printed or not) are"
+ " multiple of bytes-per-line."
+ },
+
+ { OPT_TRIGGER, false, false, false, false, false, 0, "trigger",
+ "num",
+ "If the number NUM is found and printed, close the current line and"
+ " start with a new one. If --align is set too, continue the next line"
+ " with the current column. The trigger works only for integer formats,"
+ " but not for floats."
+ },
+
+ { OPT_NO_ADDR, false, false, false, false, false, 0, "no-address",
+ 0,
+ "Suppress the address column of the dump."
+ },
+
+ { OPT_NO_NUMBERS, false, false, false, false, false, 0, "no-numbers",
+ 0,
+ "Suppress the numbers column of the dump."
+ },
+
+ { OPT_NO_TEXT, false, false, false, false, false, 0, "no-text",
+ 0,
+ "Suppress the text column of the dump."
+ },
+
+ { OPT_FORMAT, false, false, false, false, false, 0, "format",
+ 0,
+ "Add '#FORMAT:' info lines."
+ },
+
+ { OPT_NO_NULL, false, false, false, false, false, 0, "no-null",
+ 0,
+ "Ignore data lines with NULL bytes only and print a summary for each"
+ " NULL block. ('#NULL: ...')"
+ },
+
+ { OPT_NARROW, false, false, false, false, false, 0, "narrow",
+ 0,
+ "Suppress the spaces that are usually inserted for readability."
+ },
+
+ { OPT_SMALL, false, false, false, false, false, 0, "small",
+ 0,
+ "Each call will halve the number of bytes per line. Usually, 16 bytes"
+ " per lines are reduced to 8, then to 4, 2 and 1. The effective number"
+ " of bytes per line is format dependent."
+ },
+
+ { OPT_WIDE, false, false, false, false, false, 0, "wide",
+ 0,
+ "Each call will round down the current bytes per line value to the"
+ " next multiple of 16 and then increment it by 16. Usually, 16 bytes"
+ " per lines are enhanced to 32, then to 48, 64, 80 and so on. The"
+ " effective number of bytes per line is format dependent."
+ },
+
+ { OPT_BYTES, false, false, false, false, false, 0, "bytes",
+ "num",
+ "Print up to NUM bytes per line instead of 16. The maximum allowed"
+ " value is 600. The effective number of bytes per line is format"
+ " dependent (multiple of format size)."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 62
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_AT_DUMMY, false, true, false, false, false, '@', "@",
+ 0,
+ ""
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "This option is completely ignored by wlect. It only exists due to"
+ " compatibility with the other tools."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_TRACKS, false, false, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, false, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_REGION, false, false, false, false, false, 'R', "region",
+ "region",
+ "If 'region' is an unsigned number, the region for online versus races"
+ " and for battles is patched to the entered number. If the number is"
+ " prefixed by the letter 't', a test mode is enabled and the places"
+ " are patched with ascending numbers. You can patch StaticR.rel and"
+ " main.dol.\n"
+ " Otherwise a keyword is expected. Official regions are: JAPAN(0),"
+ " AMERICA(1), EUROPE(2), AUSTRALIA(OCEANIA,3), KOREA(4), TAIWAN(5) and"
+ " CHINA(6). RESTORE restores the original Nintendo values and NONE"
+ " disables region patching (default).\n"
+ " See https://wiimmfi.de/reg-list for other regions."
+ },
+
+ { OPT_VS_REGION, false, false, false, false, false, 0, "vs-region",
+ "region",
+ "Same as --region, but only for online versus races."
+ },
+
+ { OPT_BT_REGION, false, false, false, false, false, 0, "bt-region",
+ "region",
+ "Same as --region, but only for online battles."
+ },
+
+ { OPT_ALL_RANKS, true, false, false, false, false, 0, "all-ranks",
+ "[=mode]",
+ "If set to ON (default without parameter), the server query to"
+ " Nintendos servers is manipulated, so that the player will find all"
+ " players in online races independent of their ranking points. Value"
+ " RESTORE disables this feature and restores Nintendos original query."
+ " Value NONE disables this kind of patching (default)."
+ },
+
+ { OPT_POINTS, false, false, false, false, false, 0, "points",
+ "list",
+ "This patch option defines a new table for the points assigned to"
+ " players after a versus or room race. The parameter is a blank or"
+ " comma and slash (next row) separated list with numbers (points)"
+ " between 0 and 255 and the following keywords: NINTENDO, LINEAR, WIN,"
+ " WIN15, WIN25 to select a predefined table; NO-BONUS, BONUS, NULL,"
+ " ONE as options; N1..N12 to select the row for N players. See"
+ " https://szs.wiimm.de/opt/points for details."
+ },
+
+ { OPT_HTTPS, false, false, false, false, false, 0, "https",
+ "mode",
+ "Patch the https strings of REL and DOL files. 'mode' is one of the"
+ " following keywords:\n"
+ "RESTORE restores the original URLs and domains.\n"
+ "HTTP replaces HTTPS requests by HTTP and sub-domain 'naswii.' by"
+ " 'nas.'.\n"
+ "DOMAIN replace HTTPS requests by HTTP and the domain"
+ " 'nintendowifi.net' by a domain specified by option --domain.\n"
+ "SAKE0 same as DOMAIN, but don't replace URLs with SAKE domain.\n"
+ "SAKE1 same as SAKE0, but replace HTTPS of SAKE domains."
+ },
+
+ { OPT_DOMAIN, false, false, false, false, false, 0, "domain",
+ "dom",
+ "Define a domain for option --https. The default is 'wiimmfi.de'."
+ },
+
+ { OPT_WIIMMFI, false, false, false, false, false, 0, "wiimmfi",
+ 0,
+ "Patch the files for the new custom server. It is a short cut for"
+ " '--https domain --domain wiimmfi.de'."
+ },
+
+ { OPT_TWIIMMFI, false, true, false, false, false, 0, "twiimmfi",
+ 0,
+ "Patch the files for the test server. It is a short cut for '--https"
+ " domain --domain test.wiimmfi.de'."
+ },
+
+ { OPT_WC24, false, false, false, false, false, 0, "wc24",
+ 0,
+ "Exclude 2 strings of file StaticR.rel from --wiimmfi and --domain"
+ " patch to enable WC24 support."
+ },
+
+ { OPT_WCODE, true, true, false, false, false, 0, "wcode",
+ "[=mode]",
+ "Enable (mode=ON) or disable (mode=OFF) wiimmfi-code patching. Default"
+ " mode is AUTO. In this case, patching is enabled if any WCODE is"
+ " defined or option --domain is set either to 'wiimmfi.de' or to"
+ " 'test.wiimmfi.de'."
+ },
+
+ { OPT_PB_MODE, false, false, false, false, false, 0, "pb-mode",
+ "mode",
+ "Mode for the patched-by string: OFF disables modifications. RESET"
+ " resets the string to stars. WIIMMFI defines it only, if patched for"
+ " Wiimmfi. AUTO (default) defines it only, if patched. ALWAYS defines"
+ " it always."
+ },
+
+ { OPT_PATCHED_BY, false, true, false, false, false, 0, "@patched-by",
+ "string",
+ "Define a string for patched-by. Default is: wstrt vVERSION rREVISION"
+ },
+
+ { OPT_VS, false, false, false, false, false, 0, "vs",
+ "char",
+ "Reset (str is empty) or replace the second character of 'vs' to"
+ " create an own online world for versus races. The file StaticR.rel"
+ " will be patched at 4 places."
+ },
+
+ { OPT_VS2, false, true, false, false, false, 0, "vs2",
+ "str",
+ "Reset (str is empty) or replace the 2 characters of 'vs' to create an"
+ " own online world for versus races. If the parameter contains only 1"
+ " character, use 'v' as first character. The file StaticR.rel will be"
+ " patched at 4 places.\n"
+ " Wiimmfi will only detect 'Versus' if the first letter is 'v' or"
+ " 'V'."
+ },
+
+ { OPT_BT, false, false, false, false, false, 0, "bt",
+ "char",
+ "Reset (str is empty) or replace the second character of 'bt' to"
+ " create an own online world for battles. The file StaticR.rel will be"
+ " patched at 4 places."
+ },
+
+ { OPT_BT2, false, true, false, false, false, 0, "bt2",
+ "str",
+ "Reset (str is empty) or replace the 2 characters of 'bt' to create an"
+ " own online world for battles. If the parameter contains only 1"
+ " character, use 'b' as first character. The file StaticR.rel will be"
+ " patched at 4 places.\n"
+ " Wiimmfi will only detect 'Battle' if the first letter is 'b' or"
+ " 'B'."
+ },
+
+ { OPT_CANNON, false, false, false, false, false, 0, "cannon",
+ "idx,p1,p2,p3,p4",
+ "Patch parameters for cannon with index IDX (0..2). Parameters P1..P4"
+ " are floating point numbers. Repeat this option for each cannon, that"
+ " should be modified."
+ },
+
+ { OPT_MENO, false, false, false, false, false, 0, "meno",
+ 0,
+ "Patch some 'MenuSingle' and 'MenuMulti' strings of file StaticR.rel"
+ " for online usage to 'MenO*' (MenuOnline) to distinguish between"
+ " offline and online races."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ 0,
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ { OPT_CLEAN_DOL, false, false, false, false, false, 0, "clean-dol",
+ 0,
+ "Remove additional DOL sections, reset entry point and VBI address,"
+ " and try to restore other patches known by SZS tools. This is done"
+ " after loading a DOL and before analysing and patching to allow"
+ " re-patching."
+ },
+
+ { OPT_CT_DIR, false, false, false, false, false, 0, "ct-dir",
+ "dir",
+ "Define a search directory for CT-CODE parts and use the internal"
+ " copies only, if no valid file is found. Each file is searched"
+ " without and then with extension '.bz2'. For both cases bzip2 files"
+ " are detected and decompressed. Only files with correct file type are"
+ " accepted.\n"
+ " Use this option multiple times to define more than one search"
+ " directory."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 111
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_DUMP_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "For DOL files: If set, a second table with the image map is printed."
+ " If set twice, a third table with delta values is printed too."
+ };
+
+static const InfoOption_t option_cmd_HTTPS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ " Print output a C source"
+ };
+
+static const InfoOption_t option_cmd_HTTPS_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ " Print hex dump if an entry differs."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Add columns for music slot and short name."
+ };
+
+static const InfoOption_t option_cmd_FIND_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Add a user friendly track or arena name at the end of each line. If"
+ " set twice, add also the file names of the track and sound files"
+ " before the track name. If set three times, add the slot index and"
+ " the internal index (both zero based) before the file names."
+ };
+
+static const InfoOption_t option_cmd_POINTS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print the table as comma separated lists in C notation."
+ };
+
+static const InfoOption_t option_cmd_POINTS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Append a string in --points format that defines the table. If set"
+ " twice, append up to 3 strings in different modes."
+ };
+
+static const InfoOption_t option_cmd_ANALYZE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print different lists if bugs found. If set twice, print the lists"
+ " always."
+ };
+
+static const InfoOption_t option_cmd_PATCH_FORCE =
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "Accept overlapped sections.\n"
+ ">>> THE RESULT IS MOST LIKELY INVALID! <<<"
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_RAWDUMP, "_RAWDUMP", 0, 0 },
+ { CMD_DUMP, "DUMP", 0, 0 },
+ { CMD_CDUMP, "_CDUMP", 0, 0 },
+ { CMD_HEXDUMP, "HEXDUMP", "XDUMP", 0 },
+ { CMD_HTTPS, "_HTTPS", 0, 0 },
+ { CMD_EXTRACT, "EXTRACT", "X", 0 },
+ { CMD_TRACKS, "TRACKS", 0, 0 },
+ { CMD_ARENAS, "ARENAS", 0, 0 },
+ { CMD_FILES, "FILES", 0, 0 },
+ { CMD_FIND, "FIND", 0, 0 },
+ { CMD_POINTS, "POINTS", "PTS", 0 },
+ { CMD_ANALYZE, "ANALYZE", "ANA", 0 },
+ { CMD_ANALYZE, "ANALYSE", 0, 0 },
+ { CMD_PATCH, "PATCH", 0, 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "Vh@qvLc:lBHT:A:R:td:D:E:orupi";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "@", 0, 0, '@' },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "long", 0, 0, 'l' },
+ { "brief", 0, 0, 'B' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "region", 1, 0, 'R' },
+ { "vs-region", 1, 0, GO_VS_REGION },
+ { "vsregion", 1, 0, GO_VS_REGION },
+ { "vregion", 1, 0, GO_VS_REGION },
+ { "bt-region", 1, 0, GO_BT_REGION },
+ { "btregion", 1, 0, GO_BT_REGION },
+ { "bregion", 1, 0, GO_BT_REGION },
+ { "all-ranks", 2, 0, GO_ALL_RANKS },
+ { "allranks", 2, 0, GO_ALL_RANKS },
+ { "points", 1, 0, GO_POINTS },
+ { "pts", 1, 0, GO_POINTS },
+ { "cheat", 1, 0, GO_CHEAT },
+ { "https", 1, 0, GO_HTTPS },
+ { "domain", 1, 0, GO_DOMAIN },
+ { "wiimmfi", 0, 0, GO_WIIMMFI },
+ { "twiimmfi", 0, 0, GO_TWIIMMFI },
+ { "wc24", 0, 0, GO_WC24 },
+ { "wcode", 2, 0, GO_WCODE },
+ { "@add-wcode", 1, 0, GO_ADD_WCODE },
+ { "@addwcode", 1, 0, GO_ADD_WCODE },
+ { "pb-mode", 1, 0, GO_PB_MODE },
+ { "pbmode", 1, 0, GO_PB_MODE },
+ { "@patched-by", 1, 0, GO_PATCHED_BY },
+ { "@patchedby", 1, 0, GO_PATCHED_BY },
+ { "vs", 1, 0, GO_VS },
+ { "vs2", 1, 0, GO_VS2 },
+ { "bt", 1, 0, GO_BT },
+ { "bt2", 1, 0, GO_BT2 },
+ { "cannon", 1, 0, GO_CANNON },
+ { "meno", 0, 0, GO_MENO },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 0, 0, GO_EXTRACT },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "clean-dol", 0, 0, GO_CLEAN_DOL },
+ { "cleandol", 0, 0, GO_CLEAN_DOL },
+ { "add-lecode", 0, 0, GO_ADD_LECODE },
+ { "addlecode", 0, 0, GO_ADD_LECODE },
+ { "add-ctcode", 0, 0, GO_ADD_CTCODE },
+ { "addctcode", 0, 0, GO_ADD_CTCODE },
+ { "ct-dir", 1, 0, GO_CT_DIR },
+ { "ctdir", 1, 0, GO_CT_DIR },
+ { "move-d8", 0, 0, GO_MOVE_D8 },
+ { "moved8", 0, 0, GO_MOVE_D8 },
+ { "add-section", 1, 0, GO_ADD_SECTION },
+ { "addsection", 1, 0, GO_ADD_SECTION },
+ { "full-gch", 0, 0, GO_FULL_GCH },
+ { "fullgch", 0, 0, GO_FULL_GCH },
+ { "gct-no-sep", 0, 0, GO_GCT_NO_SEP },
+ { "gctnosep", 0, 0, GO_GCT_NO_SEP },
+ { "gct-sep", 0, 0, GO_GCT_SEP },
+ { "gctsep", 0, 0, GO_GCT_SEP },
+ { "gct-asm-sep", 0, 0, GO_GCT_ASM_SEP },
+ { "gctasmsep", 0, 0, GO_GCT_ASM_SEP },
+ { "gct-list", 0, 0, GO_GCT_LIST },
+ { "gctlist", 0, 0, GO_GCT_LIST },
+ { "gct-move", 2, 0, GO_GCT_MOVE },
+ { "gctmove", 2, 0, GO_GCT_MOVE },
+ { "gct-addr", 1, 0, GO_GCT_ADDR },
+ { "gctaddr", 1, 0, GO_GCT_ADDR },
+ { "gct-space", 1, 0, GO_GCT_SPACE },
+ { "gctspace", 1, 0, GO_GCT_SPACE },
+ { "allow-user-gch", 2, 0, GO_ALLOW_USER_GCH },
+ { "allowusergch", 2, 0, GO_ALLOW_USER_GCH },
+ { "create-sect", 1, 0, GO_CREATE_SECT },
+ { "createsect", 1, 0, GO_CREATE_SECT },
+ { "cs", 1, 0, GO_CREATE_SECT },
+ { "wpf", 1, 0, GO_WPF },
+ { "sections", 0, 0, GO_SECTIONS },
+ { "vaddr", 1, 0, GO_VADDR },
+ { "va", 1, 0, GO_VADDR },
+ { "faddr", 1, 0, GO_FADDR },
+ { "fa", 1, 0, GO_FADDR },
+ { "sname", 1, 0, GO_SNAME },
+ { "sn", 1, 0, GO_SNAME },
+ { "i1", 0, 0, GO_INT1 },
+ { "i2", 0, 0, GO_INT2 },
+ { "i3", 0, 0, GO_INT3 },
+ { "i4", 0, 0, GO_INT4 },
+ { "i5", 0, 0, GO_INT5 },
+ { "i6", 0, 0, GO_INT6 },
+ { "i7", 0, 0, GO_INT7 },
+ { "i8", 0, 0, GO_INT8 },
+ { "float", 0, 0, GO_FLOAT },
+ { "double", 0, 0, GO_DOUBLE },
+ { "le", 0, 0, GO_LE },
+ { "be", 0, 0, GO_BE },
+ { "zeros", 0, 0, GO_ZEROS },
+ { "hex", 0, 0, GO_HEX },
+ { "dec", 0, 0, GO_DEC },
+ { "c-syntax", 0, 0, GO_C_SYNTAX },
+ { "csyntax", 0, 0, GO_C_SYNTAX },
+ { "address", 1, 0, GO_ADDR },
+ { "align", 0, 0, GO_ALIGN },
+ { "trigger", 1, 0, GO_TRIGGER },
+ { "no-address", 0, 0, GO_NO_ADDR },
+ { "noaddress", 0, 0, GO_NO_ADDR },
+ { "no-numbers", 0, 0, GO_NO_NUMBERS },
+ { "nonumbers", 0, 0, GO_NO_NUMBERS },
+ { "no-text", 0, 0, GO_NO_TEXT },
+ { "notext", 0, 0, GO_NO_TEXT },
+ { "format", 0, 0, GO_FORMAT },
+ { "no-null", 0, 0, GO_NO_NULL },
+ { "nonull", 0, 0, GO_NO_NULL },
+ { "narrow", 0, 0, GO_NARROW },
+ { "small", 0, 0, GO_SMALL },
+ { "wide", 0, 0, GO_WIDE },
+ { "bytes", 1, 0, GO_BYTES },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x040 @ */ OPT_AT_DUMMY,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 */ 0,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d */ 0,0,0,0, 0,
+ /* 0x052 R */ OPT_REGION,
+ /* 0x053 */ 0,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 */ 0,0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,0,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 */ 0,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,0,0,0, 0,0,0,0, 0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_VS_REGION,
+ /* 0x08b */ OPT_BT_REGION,
+ /* 0x08c */ OPT_ALL_RANKS,
+ /* 0x08d */ OPT_POINTS,
+ /* 0x08e */ OPT_CHEAT,
+ /* 0x08f */ OPT_HTTPS,
+ /* 0x090 */ OPT_DOMAIN,
+ /* 0x091 */ OPT_WIIMMFI,
+ /* 0x092 */ OPT_TWIIMMFI,
+ /* 0x093 */ OPT_WC24,
+ /* 0x094 */ OPT_WCODE,
+ /* 0x095 */ OPT_ADD_WCODE,
+ /* 0x096 */ OPT_PB_MODE,
+ /* 0x097 */ OPT_PATCHED_BY,
+ /* 0x098 */ OPT_VS,
+ /* 0x099 */ OPT_VS2,
+ /* 0x09a */ OPT_BT,
+ /* 0x09b */ OPT_BT2,
+ /* 0x09c */ OPT_CANNON,
+ /* 0x09d */ OPT_MENO,
+ /* 0x09e */ OPT_UTF_8,
+ /* 0x09f */ OPT_NO_UTF_8,
+ /* 0x0a0 */ OPT_FORCE,
+ /* 0x0a1 */ OPT_REPAIR_MAGICS,
+ /* 0x0a2 */ OPT_OLD,
+ /* 0x0a3 */ OPT_STD,
+ /* 0x0a4 */ OPT_NEW,
+ /* 0x0a5 */ OPT_EXTRACT,
+ /* 0x0a6 */ OPT_NUMBER,
+ /* 0x0a7 */ OPT_CLEAN_DOL,
+ /* 0x0a8 */ OPT_ADD_LECODE,
+ /* 0x0a9 */ OPT_ADD_CTCODE,
+ /* 0x0aa */ OPT_CT_DIR,
+ /* 0x0ab */ OPT_MOVE_D8,
+ /* 0x0ac */ OPT_ADD_SECTION,
+ /* 0x0ad */ OPT_FULL_GCH,
+ /* 0x0ae */ OPT_GCT_NO_SEP,
+ /* 0x0af */ OPT_GCT_SEP,
+ /* 0x0b0 */ OPT_GCT_ASM_SEP,
+ /* 0x0b1 */ OPT_GCT_LIST,
+ /* 0x0b2 */ OPT_GCT_MOVE,
+ /* 0x0b3 */ OPT_GCT_ADDR,
+ /* 0x0b4 */ OPT_GCT_SPACE,
+ /* 0x0b5 */ OPT_ALLOW_USER_GCH,
+ /* 0x0b6 */ OPT_CREATE_SECT,
+ /* 0x0b7 */ OPT_WPF,
+ /* 0x0b8 */ OPT_SECTIONS,
+ /* 0x0b9 */ OPT_VADDR,
+ /* 0x0ba */ OPT_FADDR,
+ /* 0x0bb */ OPT_SNAME,
+ /* 0x0bc */ OPT_INT1,
+ /* 0x0bd */ OPT_INT2,
+ /* 0x0be */ OPT_INT3,
+ /* 0x0bf */ OPT_INT4,
+ /* 0x0c0 */ OPT_INT5,
+ /* 0x0c1 */ OPT_INT6,
+ /* 0x0c2 */ OPT_INT7,
+ /* 0x0c3 */ OPT_INT8,
+ /* 0x0c4 */ OPT_FLOAT,
+ /* 0x0c5 */ OPT_DOUBLE,
+ /* 0x0c6 */ OPT_LE,
+ /* 0x0c7 */ OPT_BE,
+ /* 0x0c8 */ OPT_ZEROS,
+ /* 0x0c9 */ OPT_HEX,
+ /* 0x0ca */ OPT_DEC,
+ /* 0x0cb */ OPT_C_SYNTAX,
+ /* 0x0cc */ OPT_ADDR,
+ /* 0x0cd */ OPT_ALIGN,
+ /* 0x0ce */ OPT_TRIGGER,
+ /* 0x0cf */ OPT_NO_ADDR,
+ /* 0x0d0 */ OPT_NO_NUMBERS,
+ /* 0x0d1 */ OPT_NO_TEXT,
+ /* 0x0d2 */ OPT_FORMAT,
+ /* 0x0d3 */ OPT_NO_NULL,
+ /* 0x0d4 */ OPT_NARROW,
+ /* 0x0d5 */ OPT_SMALL,
+ /* 0x0d6 */ OPT_WIDE,
+ /* 0x0d7 */ OPT_BYTES,
+ /* 0x0d8 */ 0,0,0,0, 0,0,0,0,
+ /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[62] = // cmd #1
+{
+ 0,1,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_HELP[62] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1
+};
+
+static u8 option_allowed_cmd_ARGTEST[62] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1
+};
+
+static u8 option_allowed_cmd_TEST[62] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1
+};
+
+static u8 option_allowed_cmd_COLORS[62] = // cmd #5
+{
+ 0,1,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_ERROR[62] = // cmd #6
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_FILETYPE[62] = // cmd #7
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[62] = // cmd #8
+{
+ 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_RAWDUMP[62] = // cmd #9
+{
+ 0,0,0,0,0, 0,1,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_DUMP[62] = // cmd #10
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_CDUMP[62] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_HEXDUMP[62] = // cmd #12
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1
+};
+
+static u8 option_allowed_cmd_HTTPS[62] = // cmd #13
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_EXTRACT[62] = // cmd #14
+{
+ 0,0,0,0,0, 0,1,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_TRACKS[62] = // cmd #15
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_ARENAS[62] = // cmd #16
+{
+ 0,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_FILES[62] = // cmd #17
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_FIND[62] = // cmd #18
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_POINTS[62] = // cmd #19
+{
+ 0,1,1,0,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_ANALYZE[62] = // cmd #20
+{
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+static u8 option_allowed_cmd_PATCH[62] = // cmd #21
+{
+ 0,0,0,0,0, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_POINTS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CLEAN_DOL,
+ OptionInfo + OPT_CT_DIR,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_RAWDUMP[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DUMP[] =
+{
+ &option_cmd_DUMP_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CDUMP[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HEXDUMP[] =
+{
+ OptionInfo + OPT_VADDR,
+ OptionInfo + OPT_FADDR,
+ OptionInfo + OPT_SNAME,
+ OptionInfo + OPT_LOGGING,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_INT1,
+ OptionInfo + OPT_INT2,
+ OptionInfo + OPT_INT3,
+ OptionInfo + OPT_INT4,
+ OptionInfo + OPT_INT5,
+ OptionInfo + OPT_INT6,
+ OptionInfo + OPT_INT7,
+ OptionInfo + OPT_INT8,
+ OptionInfo + OPT_FLOAT,
+ OptionInfo + OPT_DOUBLE,
+ OptionInfo + OPT_LE,
+ OptionInfo + OPT_BE,
+ OptionInfo + OPT_ZEROS,
+ OptionInfo + OPT_HEX,
+ OptionInfo + OPT_DEC,
+ OptionInfo + OPT_C_SYNTAX,
+ OptionInfo + OPT_ADDR,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_TRIGGER,
+ OptionInfo + OPT_NO_ADDR,
+ OptionInfo + OPT_NO_NUMBERS,
+ OptionInfo + OPT_NO_TEXT,
+ OptionInfo + OPT_FORMAT,
+ OptionInfo + OPT_NO_NULL,
+ OptionInfo + OPT_NARROW,
+ OptionInfo + OPT_SMALL,
+ OptionInfo + OPT_WIDE,
+ OptionInfo + OPT_BYTES,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HTTPS[] =
+{
+ &option_cmd_HTTPS_LONG,
+ &option_cmd_HTTPS_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXTRACT[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_OVERWRITE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TRACKS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ &option_cmd_TRACKS_LONG,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARENAS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ &option_cmd_TRACKS_LONG,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILES[] =
+{
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FIND[] =
+{
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+ &option_cmd_FIND_LONG,
+ OptionInfo + OPT_DE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_POINTS[] =
+{
+ OptionInfo + OPT_POINTS,
+ &option_cmd_POINTS_BRIEF,
+ &option_cmd_POINTS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ANALYZE[] =
+{
+ OptionInfo + OPT_CLEAN_DOL,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+ &option_cmd_ANALYZE_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_PATCH[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CLEAN_DOL,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_REGION,
+ OptionInfo + OPT_VS_REGION,
+ OptionInfo + OPT_BT_REGION,
+ OptionInfo + OPT_ALL_RANKS,
+ OptionInfo + OPT_HTTPS,
+ OptionInfo + OPT_DOMAIN,
+ OptionInfo + OPT_WIIMMFI,
+ OptionInfo + OPT_PB_MODE,
+ OptionInfo + OPT_WC24,
+ OptionInfo + OPT_VS,
+ OptionInfo + OPT_BT,
+ OptionInfo + OPT_CANNON,
+ OptionInfo + OPT_MENO,
+ OptionInfo + OPT_ADD_CTCODE,
+ OptionInfo + OPT_CT_DIR,
+ OptionInfo + OPT_MOVE_D8,
+ OptionInfo + OPT_ADD_SECTION,
+ OptionInfo + OPT_GCT_MOVE,
+ OptionInfo + OPT_GCT_ADDR,
+ OptionInfo + OPT_GCT_SPACE,
+ OptionInfo + OPT_ALLOW_USER_GCH,
+ &option_cmd_PATCH_FORCE,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wstrt",
+ 0,
+ "wstrt [option]... command [option|parameter|file]...",
+ "Wiimms StaticR Tool : Manipulate the 'main.dol' and 'StaticR.rel'"
+ " files of Mario Kart Wii.",
+ 0,
+ 37,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wstrt VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wstrt HELP [--width=wd] OPT|OPTION ...\n"
+ "wstrt HELP [--width=wd] CMD|COMMAND [ignored]...\n"
+ "wstrt HELP [--width=wd] command [-b] [ignored]...\n"
+ "wstrt HELP [--width=wd] [ignored]...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wstrt ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wstrt TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 0,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wstrt COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wstrt ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wstrt FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 2,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wstrt FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_RAWDUMP,
+ true,
+ false,
+ false,
+ "_RAWDUMP",
+ 0,
+ "wszst _RAWDUMP [-d|-D] destdir",
+ "This hidden command creates the destination directory and create"
+ " several files as copy of internal data.",
+ 0,
+ 2,
+ option_tab_cmd_RAWDUMP,
+ option_allowed_cmd_RAWDUMP
+ },
+
+ { CMD_DUMP,
+ false,
+ false,
+ true,
+ "DUMP",
+ 0,
+ "wstrt DUMP file...",
+ "Dump the structure of 'StaticR.rel' (in development) and of DOL files"
+ " as text.",
+ 0,
+ 1,
+ option_tab_cmd_DUMP,
+ option_allowed_cmd_DUMP
+ },
+
+ { CMD_CDUMP,
+ true,
+ false,
+ false,
+ "_CDUMP",
+ 0,
+ "wstrt _CDUMP file...",
+ "Dump the structure of 'StaticR.rel' (in development) and of DOL files"
+ " as C source fragments.",
+ 0,
+ 0,
+ option_tab_cmd_CDUMP,
+ option_allowed_cmd_CDUMP
+ },
+
+ { CMD_HEXDUMP,
+ false,
+ false,
+ false,
+ "HEXDUMP",
+ "XDUMP",
+ "wstrt HEXDUMP file...",
+ "Dump the content of DOL files as hex dump and use virtual addresses."
+ " Select parts by --vaddr, --faddr and --sname. Without selectors, the"
+ " whole file is dumped.",
+ 0,
+ 32,
+ option_tab_cmd_HEXDUMP,
+ option_allowed_cmd_HEXDUMP
+ },
+
+ { CMD_HTTPS,
+ true,
+ false,
+ false,
+ "_HTTPS",
+ 0,
+ "wstrt _HTTPS file...",
+ "Collect data about https-requests and print a total summary for all"
+ " accepted files.",
+ 0,
+ 2,
+ option_tab_cmd_HTTPS,
+ option_allowed_cmd_HTTPS
+ },
+
+ { CMD_EXTRACT,
+ false,
+ false,
+ false,
+ "EXTRACT",
+ "X",
+ "wstrt EXTRACT dol...",
+ "Extract the sections of a DOL file into a directory. StaticR.rel"
+ " files are ignored.",
+ 0,
+ 3,
+ option_tab_cmd_EXTRACT,
+ option_allowed_cmd_EXTRACT
+ },
+
+ { CMD_TRACKS,
+ false,
+ false,
+ true,
+ "TRACKS",
+ 0,
+ "wstrt TRACKS [file]...",
+ "Show track infos in the order of the 'StaticR.rel' files. If no file"
+ " is entered, the standard order is used.",
+ 0,
+ 19,
+ option_tab_cmd_TRACKS,
+ option_allowed_cmd_TRACKS
+ },
+
+ { CMD_ARENAS,
+ false,
+ false,
+ false,
+ "ARENAS",
+ 0,
+ "wstrt ARENAS [file]...",
+ "Show arena infos in the order of the 'StaticR.rel' files. If no file"
+ " is entered, the standard order is used.",
+ 0,
+ 19,
+ option_tab_cmd_ARENAS,
+ option_allowed_cmd_ARENAS
+ },
+
+ { CMD_FILES,
+ false,
+ false,
+ false,
+ "FILES",
+ 0,
+ "wstrt FILES [file]...",
+ "List track and arena file names in machine readable format. Use the"
+ " order of the entered 'StaticR.rel' files. If no file is entered, the"
+ " standard order is used.",
+ 0,
+ 15,
+ option_tab_cmd_FILES,
+ option_allowed_cmd_FILES
+ },
+
+ { CMD_FIND,
+ false,
+ false,
+ false,
+ "FIND",
+ 0,
+ "wstrt FIND [+]TRACK keyword...\n"
+ "wstrt FIND [+]ARENA keyword...",
+ "Find a track or arena by keyword and print one line for each keyword"
+ " in machine readable format 'type slot' or, if not found, a simple"
+ " '-'. The name is searched in the entered context (tracks or arenas)."
+ " If TRACK or ARENA is prefixed by a plus, then a failed search will"
+ " be continued in the other context. If at least one name is not"
+ " found, the tool terminates with exit code NOT_EXISTS.",
+ 0,
+ 17,
+ option_tab_cmd_FIND,
+ option_allowed_cmd_FIND
+ },
+
+ { CMD_POINTS,
+ false,
+ false,
+ false,
+ "POINTS",
+ "PTS",
+ "wstrt POINTS [--points=list] [file]...",
+ "Print a table with the points assigned to player after a versus or"
+ " room race for each entered file. If no file is entered, the standard"
+ " table is used. However, if option --points is set only the resulting"
+ " table is printed.",
+ 0,
+ 3,
+ option_tab_cmd_POINTS,
+ option_allowed_cmd_POINTS
+ },
+
+ { CMD_ANALYZE,
+ false,
+ false,
+ true,
+ "ANALYZE",
+ "ANA",
+ "wstrt ANALYZE [file]...",
+ "Open 'StaticR.rel' and DOL files and analyze them. The files will be"
+ " classified using SHA1 checksums.",
+ 0,
+ 17,
+ option_tab_cmd_ANALYZE,
+ option_allowed_cmd_ANALYZE
+ },
+
+ { CMD_PATCH,
+ false,
+ false,
+ false,
+ "PATCH",
+ 0,
+ "wstrt PATCH [file]...",
+ "Patch 'main.dol and 'StaticR.rel' files of Mario Kart Wii. No backup"
+ " is made.",
+ 0,
+ 34,
+ option_tab_cmd_PATCH,
+ option_allowed_cmd_PATCH
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wstrt =
+{
+ "wstrt",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wstrt.h b/project/src/ui/ui-wstrt.h
new file mode 100644
index 0000000..e1a2f2b
--- /dev/null
+++ b/project/src/ui/ui-wstrt.h
@@ -0,0 +1,560 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WSTRT_H
+#define SZS_UI_WSTRT_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_LONG,
+ OPT_BRIEF,
+ OPT_NO_HEADER,
+ OPT_CHEAT,
+ OPT_ADD_WCODE,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_ADD_LECODE,
+ OPT_ADD_CTCODE,
+ OPT_MOVE_D8,
+ OPT_ADD_SECTION,
+ OPT_FULL_GCH,
+ OPT_GCT_NO_SEP,
+ OPT_GCT_SEP,
+ OPT_GCT_ASM_SEP,
+ OPT_GCT_LIST,
+ OPT_GCT_MOVE,
+ OPT_GCT_ADDR,
+ OPT_GCT_SPACE,
+ OPT_ALLOW_USER_GCH,
+ OPT_CREATE_SECT,
+ OPT_WPF,
+ OPT_SECTIONS,
+ OPT_VADDR,
+ OPT_FADDR,
+ OPT_SNAME,
+ OPT_INT1,
+ OPT_INT2,
+ OPT_INT3,
+ OPT_INT4,
+ OPT_INT5,
+ OPT_INT6,
+ OPT_INT7,
+ OPT_INT8,
+ OPT_FLOAT,
+ OPT_DOUBLE,
+ OPT_LE,
+ OPT_BE,
+ OPT_ZEROS,
+ OPT_HEX,
+ OPT_DEC,
+ OPT_C_SYNTAX,
+ OPT_ADDR,
+ OPT_ALIGN,
+ OPT_TRIGGER,
+ OPT_NO_ADDR,
+ OPT_NO_NUMBERS,
+ OPT_NO_TEXT,
+ OPT_FORMAT,
+ OPT_NO_NULL,
+ OPT_NARROW,
+ OPT_SMALL,
+ OPT_WIDE,
+ OPT_BYTES,
+
+ OPT__N_SPECIFIC, // == 62
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_AT_DUMMY,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_REGION,
+ OPT_VS_REGION,
+ OPT_BT_REGION,
+ OPT_ALL_RANKS,
+ OPT_POINTS,
+ OPT_HTTPS,
+ OPT_DOMAIN,
+ OPT_WIIMMFI,
+ OPT_TWIIMMFI,
+ OPT_WC24,
+ OPT_WCODE,
+ OPT_PB_MODE,
+ OPT_PATCHED_BY,
+ OPT_VS,
+ OPT_VS2,
+ OPT_BT,
+ OPT_BT2,
+ OPT_CANNON,
+ OPT_MENO,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+ OPT_CLEAN_DOL,
+ OPT_CT_DIR,
+
+ OPT__N_TOTAL // == 111
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_LONG = 1llu << OPT_LONG,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_CHEAT = 1llu << OPT_CHEAT,
+// OB_ADD_WCODE = 1llu << OPT_ADD_WCODE,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_ADD_LECODE = 1llu << OPT_ADD_LECODE,
+// OB_ADD_CTCODE = 1llu << OPT_ADD_CTCODE,
+// OB_MOVE_D8 = 1llu << OPT_MOVE_D8,
+// OB_ADD_SECTION = 1llu << OPT_ADD_SECTION,
+// OB_FULL_GCH = 1llu << OPT_FULL_GCH,
+// OB_GCT_NO_SEP = 1llu << OPT_GCT_NO_SEP,
+// OB_GCT_SEP = 1llu << OPT_GCT_SEP,
+// OB_GCT_ASM_SEP = 1llu << OPT_GCT_ASM_SEP,
+// OB_GCT_LIST = 1llu << OPT_GCT_LIST,
+// OB_GCT_MOVE = 1llu << OPT_GCT_MOVE,
+// OB_GCT_ADDR = 1llu << OPT_GCT_ADDR,
+// OB_GCT_SPACE = 1llu << OPT_GCT_SPACE,
+// OB_ALLOW_USER_GCH = 1llu << OPT_ALLOW_USER_GCH,
+// OB_CREATE_SECT = 1llu << OPT_CREATE_SECT,
+// OB_WPF = 1llu << OPT_WPF,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+// OB_VADDR = 1llu << OPT_VADDR,
+// OB_FADDR = 1llu << OPT_FADDR,
+// OB_SNAME = 1llu << OPT_SNAME,
+// OB_INT1 = 1llu << OPT_INT1,
+// OB_INT2 = 1llu << OPT_INT2,
+// OB_INT3 = 1llu << OPT_INT3,
+// OB_INT4 = 1llu << OPT_INT4,
+// OB_INT5 = 1llu << OPT_INT5,
+// OB_INT6 = 1llu << OPT_INT6,
+// OB_INT7 = 1llu << OPT_INT7,
+// OB_INT8 = 1llu << OPT_INT8,
+// OB_FLOAT = 1llu << OPT_FLOAT,
+// OB_DOUBLE = 1llu << OPT_DOUBLE,
+// OB_LE = 1llu << OPT_LE,
+// OB_BE = 1llu << OPT_BE,
+// OB_ZEROS = 1llu << OPT_ZEROS,
+// OB_HEX = 1llu << OPT_HEX,
+// OB_DEC = 1llu << OPT_DEC,
+// OB_C_SYNTAX = 1llu << OPT_C_SYNTAX,
+// OB_ADDR = 1llu << OPT_ADDR,
+// OB_ALIGN = 1llu << OPT_ALIGN,
+// OB_TRIGGER = 1llu << OPT_TRIGGER,
+// OB_NO_ADDR = 1llu << OPT_NO_ADDR,
+// OB_NO_NUMBERS = 1llu << OPT_NO_NUMBERS,
+// OB_NO_TEXT = 1llu << OPT_NO_TEXT,
+// OB_FORMAT = 1llu << OPT_FORMAT,
+// OB_NO_NULL = 1llu << OPT_NO_NULL,
+// OB_NARROW = 1llu << OPT_NARROW,
+// OB_SMALL = 1llu << OPT_SMALL,
+// OB_WIDE = 1llu << OPT_WIDE,
+// OB_BYTES = 1llu << OPT_BYTES,
+//
+// //----- group & command options -----
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST
+// | OB_UPDATE
+// | OB_PRESERVE,
+//
+// OB_GRP_PATCH = 0,
+//
+// OB_GRP_HEXDUMP = OB_INT1
+// | OB_INT2
+// | OB_INT3
+// | OB_INT4
+// | OB_INT5
+// | OB_INT6
+// | OB_INT7
+// | OB_INT8
+// | OB_FLOAT
+// | OB_DOUBLE
+// | OB_LE
+// | OB_BE
+// | OB_ZEROS
+// | OB_HEX
+// | OB_DEC
+// | OB_C_SYNTAX
+// | OB_ADDR
+// | OB_ALIGN
+// | OB_TRIGGER
+// | OB_NO_ADDR
+// | OB_NO_NUMBERS
+// | OB_NO_TEXT
+// | OB_FORMAT
+// | OB_NO_NULL
+// | OB_NARROW
+// | OB_SMALL
+// | OB_WIDE
+// | OB_BYTES,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_RAWDUMP = OB_DEST
+// | OB_DEST2,
+//
+// OB_CMD_DUMP = OB_LONG,
+//
+// OB_CMD_HEXDUMP = OB_VADDR
+// | OB_FADDR
+// | OB_SNAME
+// | OB_GRP_HEXDUMP,
+//
+// OB_CMD_CDUMP = 0,
+//
+// OB_CMD_HTTPS = OB_LONG,
+//
+// OB_CMD_EXTRACT = OB_DEST
+// | OB_DEST2
+// | OB_OVERWRITE,
+//
+// OB_CMD_TRACKS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG
+// | OB_GRP_PATCH,
+//
+// OB_CMD_ARENAS = OB_CMD_TRACKS,
+//
+// OB_CMD_FILES = OB_GRP_PATCH,
+//
+// OB_CMD_FIND = OB_GRP_PATCH
+// | OB_LONG,
+//
+// OB_CMD_POINTS = OB_BRIEF
+// | OB_LONG
+// | OB_CHEAT,
+//
+// OB_CMD_ANALYZE = OB_GRP_PATCH
+// | OB_LONG,
+//
+// OB_CMD_PATCH = OB_GRP_DEST
+// | OB_IGNORE
+// | OB_GRP_PATCH
+// | OB_ADD_LECODE
+// | OB_ADD_CTCODE
+// | OB_MOVE_D8
+// | OB_ADD_SECTION
+// | OB_ADD_WCODE
+// | OB_FULL_GCH
+// | OB_GCT_NO_SEP
+// | OB_GCT_SEP
+// | OB_GCT_ASM_SEP
+// | OB_GCT_LIST
+// | OB_GCT_MOVE
+// | OB_GCT_ADDR
+// | OB_GCT_SPACE
+// | OB_ALLOW_USER_GCH
+// | OB_CREATE_SECT
+// | OB_WPF,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_RAWDUMP,
+
+ CMD_DUMP,
+ CMD_CDUMP,
+ CMD_HEXDUMP,
+ CMD_HTTPS,
+ CMD_EXTRACT,
+
+ CMD_TRACKS,
+ CMD_ARENAS,
+ CMD_FILES,
+ CMD_FIND,
+ CMD_POINTS,
+
+ CMD_ANALYZE,
+ CMD_PATCH,
+
+ CMD__N // == 22
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO__ERR = '?',
+
+ GO_AT_DUMMY = '@',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_REGION = 'R',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_VS_REGION,
+ GO_BT_REGION,
+ GO_ALL_RANKS,
+ GO_POINTS,
+ GO_CHEAT,
+ GO_HTTPS,
+ GO_DOMAIN,
+ GO_WIIMMFI,
+ GO_TWIIMMFI,
+ GO_WC24,
+ GO_WCODE,
+ GO_ADD_WCODE,
+ GO_PB_MODE,
+ GO_PATCHED_BY,
+ GO_VS,
+ GO_VS2,
+ GO_BT,
+ GO_BT2,
+ GO_CANNON,
+ GO_MENO,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_CLEAN_DOL,
+ GO_ADD_LECODE,
+ GO_ADD_CTCODE,
+ GO_CT_DIR,
+ GO_MOVE_D8,
+ GO_ADD_SECTION,
+ GO_FULL_GCH,
+ GO_GCT_NO_SEP,
+ GO_GCT_SEP,
+ GO_GCT_ASM_SEP,
+ GO_GCT_LIST,
+ GO_GCT_MOVE,
+ GO_GCT_ADDR,
+ GO_GCT_SPACE,
+ GO_ALLOW_USER_GCH,
+ GO_CREATE_SECT,
+ GO_WPF,
+ GO_SECTIONS,
+ GO_VADDR,
+ GO_FADDR,
+ GO_SNAME,
+ GO_INT1,
+ GO_INT2,
+ GO_INT3,
+ GO_INT4,
+ GO_INT5,
+ GO_INT6,
+ GO_INT7,
+ GO_INT8,
+ GO_FLOAT,
+ GO_DOUBLE,
+ GO_LE,
+ GO_BE,
+ GO_ZEROS,
+ GO_HEX,
+ GO_DEC,
+ GO_C_SYNTAX,
+ GO_ADDR,
+ GO_ALIGN,
+ GO_TRIGGER,
+ GO_NO_ADDR,
+ GO_NO_NUMBERS,
+ GO_NO_TEXT,
+ GO_FORMAT,
+ GO_NO_NULL,
+ GO_NARROW,
+ GO_SMALL,
+ GO_WIDE,
+ GO_BYTES,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wstrt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WSTRT_H
+
diff --git a/project/src/ui/ui-wszst.c b/project/src/ui/ui-wszst.c
new file mode 100644
index 0000000..c4dc814
--- /dev/null
+++ b/project/src/ui/ui-wszst.c
@@ -0,0 +1,7805 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+#include <getopt.h>
+#include "ui-wszst.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionInfo[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
+{
+ {0,0,0,0,0,0,0,0,0,0}, // OPT_NONE,
+
+ //----- command specific options -----
+
+ { OPT_TOUCH, false, false, false, false, false, 0, "touch",
+ 0,
+ "Mark the minimap as modified to force a new calculation of the"
+ " translation and inverse matrices."
+ },
+
+ { OPT_AUTO, false, false, false, false, false, 0, "auto",
+ 0,
+ "Calculate the minimap translations automatically by using the minimum"
+ " and maximum vertex coordinates. The 'scale' and 'rotation' fields"
+ " are reset. This is done as first action before the SET, CENTER and"
+ " the other transformations."
+ },
+
+ { OPT_SET_FLAGS, false, false, false, false, false, 0, "set-flags",
+ "flag",
+ "Define the flag values (default 0x31f) of the minimap."
+ },
+
+ { OPT_SET_SCALE, false, false, false, false, false, 0, "set-scale",
+ "vector",
+ "Define the scale values (default 1.0) of the minimap. The parameter"
+ " is either a vector expression or a comma separated list of"
+ " coordinates ('x,z' or 'x,y,z')."
+ },
+
+ { OPT_SET_ROT, false, false, false, false, false, 0, "set-rot",
+ "vector",
+ "Define the rotation values (default 0.0) of the minimap. The"
+ " parameter is either a vector expression or a comma separated list of"
+ " coordinates ('x,z' or 'x,y,z')."
+ },
+
+ { OPT_SET_X, false, false, false, false, false, 0, "set-x",
+ "v1[,v2]",
+ "Define 2 values and sort them to define the minimum and maximum"
+ " x-coordinates of the minimap. If 'v2' is not entered, '-v1' is used"
+ " as second value."
+ },
+
+ { OPT_SET_Y, false, false, false, false, false, 0, "set-y",
+ "v1[,v2]",
+ "Define 2 values and sort them to define the minimum and maximum"
+ " y-coordinates of the minimap. If 'v2' is not entered, '-v1' is used"
+ " as second value."
+ },
+
+ { OPT_SET_Z, false, false, false, false, false, 0, "set-z",
+ "v1[,v2]",
+ "Define 2 values and sort them to define the minimum and maximum"
+ " z-coordinates of the minimap. If 'v2' is not entered, '-v1' is used"
+ " as second value."
+ },
+
+ { OPT_XCENTER, false, false, false, false, false, 0, "xcenter",
+ 0,
+ "Center the minimap in x-direction. This is done after AUTO and SET,"
+ " but before SCALE and SHIFT."
+ },
+
+ { OPT_YCENTER, false, false, false, false, false, 0, "ycenter",
+ 0,
+ "Center the minimap in y-direction. This is done after AUTO and SET,"
+ " but before SCALE and SHIFT."
+ },
+
+ { OPT_ZCENTER, false, false, false, false, false, 0, "zcenter",
+ 0,
+ "Center the minimap in z-direction. This is done after AUTO and SET,"
+ " but before SCALE and SHIFT."
+ },
+
+ { OPT_CENTER, false, false, false, false, false, 0, "center",
+ 0,
+ "Center the minimap in all 3 directions. This is a short cut for"
+ " '--xcenter --ycenter --zcenter'."
+ },
+
+ { OPT_SCALE, false, false, false, false, false, 0, "scale",
+ "vector[@origin]",
+ "Transform the data: Scale all coordinates and size values by 'vector'"
+ " relative to the point 'origin'. If the origin is not set, 0,0,0 is"
+ " used instead.\n"
+ " Negative values mirror the coordinates. Each parameter is either a"
+ " vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_SHIFT, false, false, false, false, false, 0, "shift",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --translate, but the addition is done before rotation. The parameter"
+ " is either a vector expression or a comma separated expression list"
+ " of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_XSS, false, false, false, false, false, 0, "xss",
+ "x1old,x1new,x2old,x2new",
+ "--xss (x-scale-shift) calculates the X values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_YSS, false, false, false, false, false, 0, "yss",
+ "y1old,y1new,y2old,y2new",
+ "--yss (y-scale-shift) calculates the Y values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ZSS, false, false, false, false, false, 0, "zss",
+ "z1old,z1new,z2old,z2new",
+ "--zss (z-scale-shift) calculates the Z values of --scale and --shift,"
+ " so that old values are transformed to the new values. The parameters"
+ " are numbers or expression."
+ },
+
+ { OPT_ROT, false, false, false, false, false, 0, "rot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes"
+ " through the point 'origin'. If the origin is not set, 0,0,0 is used"
+ " instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y,z').\n"
+ " Option --rot is an alternative for --xrot, --yrot and --zrot to"
+ " define all 3 rotations in one step. Transformations are calculated"
+ " in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_XROT, false, false, false, false, false, 0, "xrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('y,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_YROT, false, false, false, false, false, 0, "yrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the x-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead. This is a"
+ " horizontal counterclockwise rotation and the old option name --hrot"
+ " can also used.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,z' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_ZROT, false, false, false, false, false, 0, "zrot",
+ "degree[@origin]",
+ "Transform the data: Rotate all coordinates and rotation values by the"
+ " angle 'degree' around the z-axis, that goes through the point"
+ " 'origin'. If the origin is not set, 0,0,0 is used instead.\n"
+ " Each parameter is either a vector expression or a comma separated"
+ " expression list of coordinates ('x,y' or 'x,y,z').\n"
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE,"
+ " Y-ROTATE, Z-ROTATE, TRANSLATE."
+ },
+
+ { OPT_YPOS, false, false, false, false, false, 0, "ypos",
+ "pos",
+ "This option defines an Y position for KMP:CKPT transformations. It"
+ " has only impact to X and Z rotations (Options --xrot and --zrot). If"
+ " not set, the mean y of the active rotation origins are used."
+ },
+
+ { OPT_TRANSLATE, false, false, false, false, false, 0, "translate",
+ "vector",
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to"
+ " --shift, but the addition is done after rotation. The parameter is"
+ " either a vector expression or a comma separated expression list of"
+ " coordinates ('x,z' or 'x,y,z'). --trans is a short cut.\n"
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE,"
+ " TRANSLATE."
+ },
+
+ { OPT_NULL, false, false, false, false, false, 0, "null",
+ 0,
+ "Create a neutral transformation without affecting the coordinates."
+ " The only influence is, that the dependent values (like maximum) are"
+ " re-calculated as if a transformation has taken place."
+ },
+
+ { OPT_NEXT, false, false, false, false, false, 0, "next",
+ 0,
+ "Close the current transformation step with all scaling, shifting,"
+ " rotation and translation options and open a new step with cleared"
+ " options. On transformation each step is logical done one by one. In"
+ " real, one total transformation matrix is calculated and used for"
+ " fast transformations.\n"
+ " If option --next is used, the ability for modifying the scale and"
+ " rotation vectors (not the positions) of different KMP sections is"
+ " nearly always lost. A warning is printed if this occurs."
+ },
+
+ { OPT_ASCALE, false, false, false, false, false, 0, "ascale",
+ "factor@dir",
+ "Transform the data and do an axis scale: Close the current"
+ " transformation step like --next and scale the data by 'factor' into"
+ " the direction given by the vector 'dir'. Store the resulting matrix"
+ " as single transformation step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_AROT, false, false, false, false, false, 0, "arot",
+ "degree[@pos1]@pos2",
+ "Transform the data and do an axis rotation: Close the current"
+ " transformation step like --next and rotate the data by 'degree'"
+ " around the axis defined by the 2 points. If 'pos1' is not set, use"
+ " 0,0,0 instead. Store the resulting matrix as single transformation"
+ " step and open a new one.\n"
+ " This kind of transformation is EXPERIMENTAL!"
+ },
+
+ { OPT_TFORM_SCRIPT, false, false, false, false, false, 0, "tform-script",
+ "script",
+ "Load the script and execute it by the text parser.\n"
+ " Then for each coordinate (2D and 3D), call the macro TRANSFORM after"
+ " all other transformations. Call it without parameters and set"
+ " variable $I with a zero based index of all vertices, variable $D to"
+ " the dimension (2 or 3) and the variable $P to the vector of the"
+ " current vertex. If the macro returns a vector, it is the new"
+ " position.\n"
+ " For each file, macro BEGIN is called at the beginning and END after"
+ " processing all points, but only, if the macros are defined. For END,"
+ " variable $I is set to the number of processed vertices in the"
+ " current file.\n"
+ " Before each macro call, the private and local variables are cleared"
+ " and only global parameters are permanent. The zero based index is"
+ " cleared for each new source. The parameters of the macro calls are"
+ " defined in the local name space."
+ },
+
+ { OPT_MINIMAP, false, false, false, false, false, 0, "minimap",
+ 0,
+ "Fix the minimap position in the same way as 'wszst MINIMAP --auto'."
+ " All other minimap related options are ignored for the minimap"
+ " processing. See https://szs.wiimm.de/cmd/wszst/minimap for details."
+ },
+
+ { OPT_RM_GOBJ, false, false, false, false, false, 0, "rm-gobj",
+ "objlist",
+ "Remove objects from the KMP section GOBJ. Therefor a comma separated"
+ " object list with single values like 'a' or ranges like 'a:b' is"
+ " expected. 'a' and 'b' are numbers, object names (prefixed by 'o$')"
+ " or any other parser expressions."
+ },
+
+ { OPT_SLOT, false, false, false, false, false, 0, "slot",
+ "keyword",
+ "Patch a track file to run at the specified slot. KMP and KCL may be"
+ " modified. BRRES files may be added to or removed from SZS. The main"
+ " keywords are DAISY, DESERT, SHERBET, SHYGUY, STANDARD and MOST. Slot"
+ " numbers (except '42' and '4.2') and different other track names are"
+ " also accepted. For some conversions, the auto-add library is needed."
+ " See https://szs.wiimm.de/opt/slot for details."
+ },
+
+ { OPT_KCL_FLAG, false, false, false, false, false, 0, "kcl-flag",
+ "joblist",
+ "Modify the KCL flag of KCL files. A comma separated job list in the"
+ " format 'srclist=dest' is expected. 'srclist' is a plus sign"
+ " separated list with single values like <val>, T<type> and"
+ " <val>/<mask> or ranges like <val>:<val>, T<type>:<type> and"
+ " <val>:<val>/<mask>. '<val>' is a complete KCL flag in the range of"
+ " 0..0xffff. '<type>' are only the base types in the range of 0..0x1f."
+ " If <mask> is present, it marks the relevant bits. For the T<type>"
+ " variant, the mask is set to 0x1f.\n"
+ " All KCL flags of the source list are assigned to the new value"
+ " 'dest', but only the set bits of '<mask>' are modified. A later"
+ " definition overrides the previous one. See"
+ " https://szs.wiimm.de/opt/kcl-flag for details."
+ },
+
+ { OPT_KCL_SCRIPT, false, false, false, false, false, 0, "kcl-script",
+ "script",
+ "After reading a KCL source file and executing all transformations,"
+ " the text file 'script' is executed by the internal text parser. The"
+ " script should use the parser functions tri$*() to read and modify"
+ " the triangle positions and flags, or to add or remove complete"
+ " triangles.\n"
+ " If this option is used multiple times, each script is executed in"
+ " the entered order. See https://szs.wiimm.de/opt/kcl-script for"
+ " details."
+ },
+
+ { OPT_FLAG_FILE, false, false, false, false, false, 0, "flag-file",
+ "filename",
+ "Define a flag file if scanning an OBJ file (KCL processing). The file"
+ " name may contain %-escapes. Set it to an empty string to disable"
+ " flag files at all.\n"
+ " The tool search the flag file in the following order until found:"
+ " File defined by --flag-file; OBJ file name with replaced extension"
+ " ('a.obj' becomes 'a.flag'); OBJ file name with appended extension"
+ " ('a.obj' becomes 'a.obj.flag'). See"
+ " https://szs.wiimm.de/opt/flag-file for details."
+ },
+
+ { OPT_REPAIR_XPF, false, false, false, false, false, 0, "repair-xpflags",
+ "file",
+ "Load a KMP file and use it to repair the settings of the extended"
+ " presence flags, if they are destroyed by another KMP tool. --repxpf"
+ " is a short cut for this option."
+ },
+
+ { OPT_GAMEMODES, false, false, false, false, false, 0, "gamemodes",
+ "list",
+ "Filter the list of combinations. The parameter is a comma separated"
+ " list of keywords: AUTO: Add a automatic mode without conditions"
+ " first. STANDARD (or STD): Add standard modes. 1STANDARD (or 1STD):"
+ " Add standard modes first. BALLOON: Add balloon battle modes. COIN:"
+ " Add coin runners modes. BATTLE: Short cut for 'BALLOON,COIN'. VERSUS"
+ " (or VS): Add versus modes. ITEMRAIN: Add itemrain modes. RACE: Short"
+ " cut for 'VERSUS,ITEMRAIN'. ALL (default): Short cut for"
+ " 'STANDARD,BATTLE,RACE'. NO-MODES: Exclude 'ALL' and create auto"
+ " modes only. ENGINE: Include engine classes (default). NO-ENGINE:"
+ " Exclude engine classes. RANDOM: Include random modes (default)."
+ " NO-RANDOM: Exclude random modes. OFFLINE: Filter offline modes."
+ " ONLINE: Filter online modes. NO-TT: Exclude time trial. TT: Force a"
+ " time trial scenario, even if it is a duplicate. FULL: Don't"
+ " eliminate duplicates from list (up to 1573 modes). NSORT: Sort the"
+ " list by name. ISORT: Sort the list by index. DEBUG: Print a debug"
+ " info about this option."
+ },
+
+ { OPT_LOAD_BMG, false, false, false, false, false, 0, "load-bmg",
+ "file",
+ "Load immediately the file to fill an internal message pool. The"
+ " option can be used multiple times to fill the message pool by"
+ " different sources. A later message overrides the previous message.\n"
+ " The internal message pool is patched by all --patch-bmg options."
+ },
+
+ { OPT_PATCH_BMG, false, false, false, false, false, 0, "patch-bmg",
+ "mode[cond][=param]",
+ "This option specifies a BMG patch mode. Some of the modes need a"
+ " parameter or a file name of a BMG patch file (raw or text BMG), both"
+ " separated by an equal sign. Modes with required file names are"
+ " PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL and NOTEQUAL."
+ " Modes with text parameter are FORMAT, REGEXP and RM-REGEXP. "
+ " Standalone modes are ID, ID-ALL, UNICODE, RM-ESCAPES, RM-CUPS,"
+ " CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY, LE-FILL,"
+ " X-COPY, X-FORCE-COPY and X-FILL. Unique abbreviations are allowed.\n"
+ " The optional condition COND is either '?MID' or '!MID'. In case of"
+ " '?MID', the patch is only applied if the message id MID already"
+ " exists. In case of '!MID', the patch is only applied if the message"
+ " id MID does not exists.\n"
+ " If this option is used multiple times, all patch files will be"
+ " processed in the entered order. Read"
+ " https://szs.wiimm.de/opt/patch-bmg for more details."
+ },
+
+ { OPT_MACRO_BMG, false, false, false, false, false, 0, "macro-bmg",
+ "file",
+ "Load a BMG file and add the messages to the macro library; already"
+ " existing entries are replaced. The macro library is accessed by"
+ " escape sequence \\m{MID} as fallback, if the active file has not"
+ " already defined the message MID by itself."
+ },
+
+ { OPT_FILTER_BMG, false, false, false, false, false, 0, "filter-bmg",
+ "list",
+ "If this option is set, the BMG messages are filtered by this list."
+ " Only enabled messages are exported to the output BMG file (binary or"
+ " text).\n"
+ " The parameter is a list of message ids (short MID, 'Txx' or 'Uxx'"
+ " or Mxx' or hex number) or message ranges (MID:MID) or one of the"
+ " keywords NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT,"
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE),"
+ " LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS,"
+ " XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS,"
+ " GENERIC or ALL. If an element is preceded by a minus sign, it is"
+ " removed from the filter list (disabled).\n"
+ " With v2.01a, this option was renamed from --msg to the more"
+ " meaningful name --filter-bmg. The old name is still available.\n"
+ " Read https://szs.wiimm.de/opt/filter-bmg for more details."
+ },
+
+ { OPT_ID, false, false, false, false, false, 0, "id",
+ 0,
+ "Print an ID with 8 characters instead of a SHA-1 sum with 40"
+ " characters. The SHA-1 sum is used to calculate the ID. The ID"
+ " consists of '0'-'9' and 'a'-'w' (32 characters)."
+ },
+
+ { OPT_BASE64, true, false, false, false, false, 0, "base64",
+ "[=mode]",
+ "Encode the the checksum string as BASE64 with 27 characters instead"
+ " of hex. If a parameter is set, it acts like --coding=mode."
+ },
+
+ { OPT_DB64, true, false, false, false, false, 0, "db64",
+ "[=mode]",
+ "Encode the the checksum string and some length as BASE64 with 32"
+ " characters instead of hex for database searches. This options"
+ " implies --coding=URL if no other coding is defined. If a parameter"
+ " is set, it acts like --coding=mode. Option --db64 has priority over"
+ " --base64."
+ },
+
+ { OPT_CODING, false, false, false, false, false, 0, "coding",
+ "mode",
+ "Define the coding of the non alphanumeric characters for BASE64:"
+ " STANDART (+/=, default), URL (-_=), STAR (-_*) or XML (.-*)."
+ },
+
+ { OPT_VERIFY, false, false, false, false, false, 0, "verify",
+ 0,
+ "Calculate the checksum and compare the filename and return exit"
+ " status (0=valid, 2=differ). The result is valid, if the checksum is"
+ " found with a leading and a following point or minus sign. If --quiet"
+ " is set, error messages are suppressed."
+ },
+
+ { OPT_ROUND, false, false, false, false, false, 0, "round",
+ 0,
+ "Print additional lines with rounded values (to 3 and 2 bytes for"
+ " floats and 7 and 6 bytes for doubles)."
+ },
+
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Multiple usage possible."
+ },
+
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress printing of header and footer."
+ },
+
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress information lines in decoded text files. This includes"
+ " syntax information (--no-header). If set twice, the output of"
+ " unneeded sections is also suppressed."
+ },
+
+ { OPT_PIPE, false, false, false, false, false, 0, "pipe",
+ 0,
+ "Use pipe sign instead of spaces to separate columns."
+ },
+
+ { OPT_DELTA, false, false, false, false, false, 0, "delta",
+ 0,
+ "Print only modified records or sections on text output. Supported"
+ " file formats until now: GEOHIT, ITEMSLOT, KMG and OBJFLOW. If set"
+ " twice, limit output to modified records (only relevant for"
+ " ITEMSLOT)."
+ },
+
+ { OPT_DIFF, false, false, false, false, false, 0, "diff",
+ 0,
+ "On text output, print only differences from original files. It's a"
+ " short cut for --no-header --brief --brief --delta --delta."
+ " Additional, the output is limited to data sections."
+ },
+
+ { OPT_EPSILON, false, true, false, false, false, 0, "epsilon",
+ "float",
+ "When comparing floating point numbers, 2 numbers are considered"
+ " identical if their difference is less than or equal to epsilon. The"
+ " default value is 0.01."
+ },
+
+ { OPT_BMG_ENCODING, false, false, false, false, false, 0, "bmg-encoding",
+ "name",
+ "Force a BMG encoding for new BMG files. Accepted encoding names are:"
+ " CP-1252, UTF-16BE (or UTF-16), SHIFT-JIS, UTF-8 and AUTO for"
+ " automatic detection (default). Same keywords without minus signs are"
+ " accepted too.\n"
+ " Mario Kart Wii uses encoding UTF-16BE; the default if no other"
+ " encoding is defined."
+ },
+
+ { OPT_BMG_INF_SIZE, false, false, false, false, false, 0, "bmg-inf-size",
+ "size",
+ "Defines the 'INF1' size of new BMG files between 4 and 1000. The"
+ " first 4 bytes of a INF1 record is an offset into the string pool and"
+ " the remaining bytes the attributes. Maximal 40 attribute bytes are"
+ " supported and additional bytes are assumed to be NULL. All BMG files"
+ " of MKW have a size of 8."
+ },
+
+ { OPT_BMG_MID, true, false, false, false, false, 0, "bmg-mid",
+ "[mode]",
+ "Control the creation of BMG section MID1. Suppress the creation, if"
+ " mode is OFF. Force the creation, if mode is ON. On mode AUTO"
+ " (default), the source is analysed for the decision."
+ },
+
+ { OPT_FORCE_ATTRIB, false, false, false, false, false, 0, "force-attrib",
+ "attrib",
+ "Forces, that all attributes are set to this vector. See"
+ " https://szs.wiimm.de/doc/bmg/attrib for the syntax."
+ },
+
+ { OPT_DEF_ATTRIB, false, false, false, false, false, 0, "def-attrib",
+ "attrib",
+ "Define the default attributes for BMG files. If not set, the default"
+ " attributes are estimated. On text output, strings with default"
+ " attributes are printed without attribute vector. The usual default"
+ " attribute for MKW is [1]. See https://szs.wiimm.de/doc/bmg/attrib"
+ " for the syntax."
+ },
+
+ { OPT_NO_ATTRIB, false, false, false, false, false, 0, "no-attrib",
+ 0,
+ "Suppress the output of any BMG attributes if creating BMG text files."
+ },
+
+ { OPT_X_ESCAPES, false, false, false, false, false, 0, "x-escapes",
+ 0,
+ "Use \\x{} escapes instead of \\z{} escapes."
+ },
+
+ { OPT_OLD_ESCAPES, false, false, false, false, false, 0, "old-escapes",
+ 0,
+ "To be compatible with v1.43 and earlier, print 1A escape sequences"
+ " with total size of >12 bytes as single words using \\x{}. Also don't"
+ " use \\x{} and \\u{} with parameter lists."
+ },
+
+ { OPT_SINGLE_LINE, false, false, false, false, false, '1', "single-line",
+ 0,
+ "If set, don't print continuation lines for BMG text output. If set"
+ " twice, print only single text lines and suppress attributes like"
+ " option --no-attrib does it."
+ },
+
+ { OPT_NO_BMG_COLORS, false, false, false, false, false, 0, "no-bmg-colors",
+ 0,
+ "If set, suppress the output of '\\c{color}' escape sequences for"
+ " colors definitions in BMG text output to be compatible with old"
+ " versions of the tools."
+ },
+
+ { OPT_BMG_COLORS, false, false, false, false, false, 0, "bmg-colors",
+ 0,
+ "Force output of '\\c{color}' escape sequences with names, even for"
+ " foreign (not MKWii) BMG files."
+ },
+
+ { OPT_NO_BMG_INLINE, false, false, false, false, false, 0, "no-bmg-inline",
+ 0,
+ "Print BMG attributes as separate line before the message definition"
+ " to be compatible with versions until v1.39. The output for the"
+ " standard value 0x01000000 is always suppressed. This was the default"
+ " until v1.43."
+ },
+
+ { OPT_EXPORT, false, false, false, false, false, 'X', "export",
+ 0,
+ "Enable the export mode and create small and machine readable text"
+ " files for easy post processing. The option works similar like -HBB"
+ " for KMP and like -HBl1 for BMG text files."
+ },
+
+ { OPT_NO_PARAM, false, false, false, false, false, 'P', "no-param",
+ 0,
+ "Disable parameter support in decoded KMP text files."
+ },
+
+ { OPT_SORT, false, false, false, false, false, 'S', "sort",
+ "mode",
+ "Define a sort mode. Allowed keywords are: NONE (default), NAME,"
+ " OFFSET, U8, PACK, BRRES, BREFT and AUTO"
+ },
+
+ { OPT_TRANSFORM, false, false, false, false, true, 'x', "transform",
+ "list",
+ "Convert image formats. A comma separated list with terms is expected."
+ " A term have the syntax '[SRC=]DEST'. It means: convert SRC format"
+ " into DEST format. If SRC= is not set, the destination format is used"
+ " 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"
+ " 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"
+ " (import). Allowed image formats are: I4, I8, IA4, IA8, RGB565"
+ " (=R565), RGB5A3 (=R3), RGBA32 (=R32), C4, C8, C14X2, CMPR. Allowed"
+ " palette formats are: P-IA8 (=P8), P-RGB565 (=P565), P-RGB5A3 (=P3)."
+ " Attributtes are PALETTE, NO-PALETTE, GRAY, COLOR, ALPHA and"
+ " NO-ALPHA.\n"
+ " All terms are managed as list. For each graphic the list is"
+ " iterated until the first SRC tuple of a term matches the graphic."
+ " Then the destination tuple is used for the transformation.\n"
+ " The command 'wimgt TEST' prints a clearly arranged readable table"
+ " as result of this option."
+ },
+
+ { OPT_STRIP, false, false, false, false, false, 0, "strip",
+ 0,
+ "If creating a PNG file, don't add comments about creator and source"
+ " formats."
+ },
+
+ { OPT_ANALYZE, false, true, false, false, true, 0, "analyze",
+ "outfile",
+ "Run in analyze mode and write results to the entered file."
+ },
+
+ { OPT_ANALYZE_MODE, false, true, false, false, false, 0, "analyze-mode",
+ "modelist",
+ "Comma separated list with objects to analyse. Objects are BRRES,"
+ " MDL0, PAT0, TEX0, BREFF, BREFT, TPL, KCL, KMP, GOBJ, KTPT, MKWANA"
+ " and ALL for all (=default). --ana-mode is a short cut."
+ },
+
+ { OPT_SOURCE, false, false, false, false, true, 's', "source",
+ "path",
+ "Define a secondary source path (directory/file).\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified primary source name. %P and %F are replaced by the primary"
+ " source path or by the filename. %N and %E are replaced by primary"
+ " source filename without extension or by the source extension."
+ " Finally, %T is replaced by the default extension of a virtual"
+ " destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/source for more details."
+ },
+
+ { OPT_DEST, false, false, false, false, false, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output.\n"
+ " The path may contain escape sequences: %Q is replaced by the fully"
+ " qualified source name. %P and %F are replaced by the source path or"
+ " by the filename. %N and %E are replaced by source filename without"
+ " extension or by the source extension. Finally, %T is replaced by the"
+ " default extension of the destination format.\n"
+ " A '?' direct behind '%' in %E and %T conversions avoid that the"
+ " same extension is used twice in row. Read"
+ " https://szs.wiimm.de/opt/dest for more details."
+ },
+
+ { OPT_DEST2, false, false, false, false, false, 'D', "DEST",
+ "path",
+ "Like --dest, but create the directory path automatically."
+ },
+
+ { OPT_ESC, false, false, false, false, false, 'E', "esc",
+ "char",
+ "Define an alternative escape character for destination files. The"
+ " default is '%'. For Windows batch files it is a good choice to set"
+ " '-E$'."
+ },
+
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files without warning and ignore option"
+ " --number."
+ },
+
+ { OPT_NUMBER, false, false, false, false, false, 0, "number",
+ 0,
+ "If a file already exist, append a number directly before the file"
+ " extension to make the filename unique. If other numbered files"
+ " already exist (ignoring case), use the maximum existing index+1."
+ " --num is a short cut."
+ },
+
+ { OPT_REMOVE_SRC, false, false, false, false, false, 0, "remove-src",
+ 0,
+ "Remove the source file after successful operation. --rm-src is a"
+ " short cut."
+ },
+
+ { OPT_REMOVE_DEST, false, false, false, false, false, 'r', "remove-dest",
+ 0,
+ "Remove already existing files before creating it. If set, --overwrite"
+ " is ignored. --rm-dest is a short cut."
+ },
+
+ { OPT_UPDATE, false, false, false, false, false, 'u', "update",
+ 0,
+ "Update only existing files and don't create new files. If set,"
+ " --overwrite and --remove-dest are ignored."
+ },
+
+ { OPT_PRESERVE, false, false, false, false, false, 'p', "preserve",
+ 0,
+ "Preserve file times (atime+mtime) while converting or copying files."
+ },
+
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "Ignore non existing source files without warning."
+ },
+
+ { OPT_IGNORE_SETUP, false, false, false, false, false, 0, "ignore-setup",
+ 0,
+ "Ignore hidden setup file 'wszst-setup.txt'. This file is used to"
+ " determine some default settings and to find out sub archives and"
+ " files to encode. Use this option only if you know what you do."
+ },
+
+ { OPT_PURGE, false, false, false, false, false, 0, "purge",
+ 0,
+ "Remove repeated files with same checksum."
+ },
+
+ { OPT_ALIGN_U8, false, false, false, false, false, 0, "align-u8",
+ "size",
+ "Define an align value for the sub files in U8 archives. The value"
+ " must be a power of 2 and the default value is 32 (0x20) This value"
+ " is only relevant if creating or normalizing U8 archives."
+ },
+
+ { OPT_ALIGN_PACK, false, false, false, false, false, 0, "align-pack",
+ "size",
+ "Define an align value for the sub files in PACK archives. The value"
+ " must be a power of 2 and the default value is 32 (0x20) This value"
+ " is only relevant if creating or normalizing OACK archives."
+ },
+
+ { OPT_ALIGN_BRRES, false, false, false, false, false, 0, "align-brres",
+ "size",
+ "Define an align value for the sub files in BRRES archives. The value"
+ " must be a power of 2 and the default value is 4 This value is only"
+ " relevant if creating or normalizing BRRES archives."
+ },
+
+ { OPT_ALIGN_BREFF, false, false, false, false, false, 0, "align-breff",
+ "size",
+ "Define an align value for the sub files in BREFF archives. The value"
+ " must be a power of 2 and the default value is 4 This value is only"
+ " relevant if creating or normalizing BREFF archives."
+ },
+
+ { OPT_ALIGN_BREFT, false, false, false, false, false, 0, "align-breft",
+ "size",
+ "Define an align value for the sub files in BREFT archives. The value"
+ " must be a power of 2 and the default value is 0x20 This value is"
+ " only relevant if creating or normalizing BREFT archives."
+ },
+
+ { OPT_ALIGN, false, false, false, false, false, 0, "align",
+ "size",
+ "Define an align value for the sub files in all archives. This is a"
+ " short cut for '--align-u8=size --align-pack=size --align-brres=size"
+ " --align-breff=size --align-breft=size'."
+ },
+
+ { OPT_ENCODE_ALL, false, false, false, false, false, 0, "encode-all",
+ 0,
+ "Encode all files. Normally a file is only encoded, if the source is"
+ " younger than the destination or the destination is missing. Only"
+ " files in the [encode] section of the file 'wszst-setup.txt' are"
+ " candidates for encoding. --eall is a short cut. Option --no-encode"
+ " takes precedence over --encode-all."
+ },
+
+ { OPT_ENCODE_IMG, false, false, false, false, false, 0, "encode-img",
+ 0,
+ "Encode all image files. Normally a image file is only encoded, if the"
+ " source is younger than the destination or the destination is"
+ " missing. Only files in the [encode] section of the file"
+ " 'wszst-setup.txt' are candidates for encoding. --eimg is a short"
+ " cut. If set, option --no-encode is ignored for images."
+ },
+
+ { OPT_NO_ENCODE, false, false, false, false, false, 0, "no-encode",
+ 0,
+ "Do not encode files before creating an archive. --noenc is a short"
+ " cut. Option --no-encode takes precedence over --encode-all, but"
+ " --encode-img takes precedence for images."
+ },
+
+ { OPT_NO_RECURSE, false, false, false, false, false, 0, "no-recurse",
+ 0,
+ "Do not create archives recursively. Normally files in the [create]"
+ " section of the file 'wszst-setup.txt' are created first. --norec is"
+ " a short cut."
+ },
+
+ { OPT_AUTO_ADD, false, false, false, false, false, 0, "auto-add",
+ 0,
+ "Analyze the KMP (if exist) and add missing BRRES, BREFF, BREFT, BRASD"
+ " and KCL files automatically, if the tool can find the files in any"
+ " sub directory named 'auto-add'. This sub directory is searched in"
+ " all directories of 'SEARCH_PATH'; use command 'wszst AUTOADD' to"
+ " view them. Command 'wszst AUTOADD' may also create an auto-add"
+ " database. --aadd is a short cut."
+ },
+
+ { OPT_NO_ECHO, false, false, false, false, false, 0, "no-echo",
+ 0,
+ "Suppress output of @ECHO commands while scanning text files."
+ },
+
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Do not make plausibility checks for KCL and KMP files."
+ },
+
+ { OPT_PT_DIR, true, false, false, false, false, 0, "pt-dir",
+ "[=mode]",
+ "Set one of the `point directory' modes REMOVE (=0), FORCE (=1) or"
+ " AUTO (default). If --pt-dir is used without parameter, then FORCE is"
+ " assumed.\n"
+ " This option is only relevant if creating an U8 archive. It decides,"
+ " if a special directory with name '.' will be added as base for all"
+ " other files."
+ },
+
+ { OPT_RM_AIPARAM, false, false, false, false, false, 0, "rm-aiparam",
+ 0,
+ "Remove the directory AIParam and all files from the archive. This"
+ " option has only impact, if creating a new archive or normalizing an"
+ " existing archive. --rmai is a short cut."
+ },
+
+ { OPT_U8, false, false, false, false, false, 0, "u8",
+ 0,
+ "Create an U8 archive, if possible. If the source is a WU8 archive,"
+ " convert it to an U8 archive. This is the default if the setup file"
+ " 'wszst-setup.txt' has no other definition. The default compression"
+ " mode is set to Yaz0 (see --yaz0)."
+ },
+
+ { OPT_SZS, false, false, false, false, false, 0, "szs",
+ 0,
+ "Short cut for '--u8 --yaz0': Create an U8 archive, if possible, and"
+ " set the compression method to Yaz0."
+ },
+
+ { OPT_WU8, false, false, false, false, false, 0, "wu8",
+ 0,
+ "Create a WU8 archive, if possible. If the source is an U8 archive,"
+ " convert it to a WU8 archive."
+ },
+
+ { OPT_XWU8, false, true, false, false, false, 0, "xwu8",
+ 0,
+ "Short cut for '--wu8 --xyz': Create a WU8 archive, if possible, and"
+ " set the compression method to XYZ."
+ },
+
+ { OPT_WBZ, false, false, false, false, false, 0, "wbz",
+ 0,
+ "Short cut for '--wu8 --bz': Create a WU8 archive, if possible, and"
+ " set the compression method to BZ."
+ },
+
+ { OPT_PACK, false, false, false, false, false, 0, "pack",
+ 0,
+ "Create a PACK archive."
+ },
+
+ { OPT_BRRES, false, false, false, false, false, 0, "brres",
+ 0,
+ "Create a BRRES archive."
+ },
+
+ { OPT_BREFF, false, false, false, false, false, 0, "breff",
+ 0,
+ "Create a BREFF archive."
+ },
+
+ { OPT_BREFT, false, false, false, false, false, 0, "breft",
+ 0,
+ "Create a BREFT archive."
+ },
+
+ { OPT_NO_COMPRESS, false, false, false, false, false, 0, "no-compress",
+ 0,
+ "Create an uncompressed file instead of a compressed SZS file. The"
+ " default destination changes to '%P/%N%T'. --noc is a short cut."
+ },
+
+ { OPT_COMPRESS, false, false, false, false, false, 'C', "compr",
+ "level",
+ "Define a compression level between 0..9: 0 (or NOCHUNKS) disables"
+ " finding chunks, 1 (or FAST) for the fastest standard compression and"
+ " 9 (or BEST) for the best (=default) compression. 10 (or ULTRA) and"
+ " 100-150 are special time-consuming compression modes. They are"
+ " dedicated to competitions with size limitations. The special value"
+ " UNCOMPRESSED acts like option --no-compress.\n"
+ " Because of many repeated data, the best bz-compression mode varies."
+ " Therefor the levels TRY2..TRY5 (or short T2..T5) are defined to find"
+ " the best compression mode with testing the first N modes of 9, 1, 8,"
+ " 2, 5. TRY2 is used for normalizing. For non bz-compression, TRY* are"
+ " the same as BEST.\n"
+ " Option --norm takes precedence over --compr and sets the"
+ " compression level to TRY2 (BEST).\n"
+ " For more modes and details type 'wszst -C list'. To force colorized"
+ " output type 'wszst -C clist'."
+ },
+
+ { OPT_FAST, false, false, false, false, false, 0, "fast",
+ 0,
+ "Short cut for --compr=fast: Set the fastest real compression. It also"
+ " overrides compression rates set by --norm or --compr."
+ },
+
+ { OPT_NORM, false, false, false, false, false, 'n', "norm",
+ 0,
+ "The uncompressed data will be normalized. See command NORMALIZE for"
+ " more details."
+ },
+
+ { OPT_LINKS, false, false, false, false, false, 0, "links",
+ 0,
+ "Support hardlinks while creating U8 and WU8 archives. Keep hardlinks"
+ " if normalizing U8 and WU8 archives. On extracting, search hardlinks"
+ " in every archive and try to create hardlinks at local file system."
+ },
+
+ { OPT_BASEDIR, false, false, false, false, true, 0, "basedir",
+ "directory",
+ "Extract only files from archives, that are below the DIRECTORY."
+ " Leading points and slashes and trailing slahes are removed from the"
+ " parameter. --bdir is short cut for --basedir."
+ },
+
+ { OPT_RECURSE, true, false, false, false, false, 'R', "recurse",
+ "[=level]",
+ "If a extracted file is a known and supported archive, than extract it"
+ " recursively until the entered level is reached. Level 0 (=NONE)"
+ " deactivates this. If --recurse is used without parameter, then"
+ " UNLIMITED is assumed.\n"
+ " -R does'nt accept a parameter and is a short cut for"
+ " --recurse=unlimited."
+ },
+
+ { OPT_EXT, false, false, false, false, false, 'e', "ext",
+ 0,
+ "For BRRES archives only: If a file is extracted, add a handy file"
+ " extension like '.mdl' to the file name. If set twice and a textual"
+ " file magic is available, use the file magic in lower case instead"
+ " like '.mdl0'."
+ },
+
+ { OPT_DECODE, false, false, false, false, false, 0, "decode",
+ 0,
+ "If a extracted file is known and can be decoded, do it. --dec is a"
+ " short cut."
+ },
+
+ { OPT_MIPMAPS, false, false, false, false, false, 0, "mipmaps",
+ 0,
+ "If reading a source, scan for mipmaps and load them too. For PNG"
+ " files, files named NAME.mm#.EXT with #=1.. are searched. This is the"
+ " default. --mm is a short cut."
+ },
+
+ { OPT_NO_MIPMAPS, false, false, false, false, false, 0, "no-mipmaps",
+ 0,
+ "If reading a source, ignore mipmaps. This disables not the creation"
+ " of mipmaps (see -n-mipmaps). --no-mm is a short cut."
+ },
+
+ { OPT_N_MIPMAPS, false, false, false, false, false, 0, "n-mipmaps",
+ "num",
+ "Force the number of mipmaps. Values between 0 and 20 are allowed."
+ " Value OFF (default) disables this option. If enabled, options"
+ " --max-mipmaps and --mipmap-size are ignored. The creation of mipmaps"
+ " stops if the width or the height of the mipmap becomes 0. --n-mm is"
+ " a short cut."
+ },
+
+ { OPT_MAX_MIPMAPS, false, false, false, false, false, 0, "max-mipmaps",
+ "num",
+ "Control the automatic mipmap creation. Values between 0 and 20 are"
+ " allowed and the default is 4. The mipmap creation for an image"
+ " stops, if the set number is reached. This option is ignored, if"
+ " --n-mipmaps is enabled. --max-mm is a short cut."
+ },
+
+ { OPT_MIPMAP_SIZE, false, false, false, false, false, 0, "mipmap-size",
+ "num",
+ "Define the minimal width and minimal height of a generated mipmap."
+ " Any value >0 is allowed. The default is 8. This option is ignored,"
+ " if --n-mipmaps is enabled. --mm-size is a short cut."
+ },
+
+ { OPT_FAST_MIPMAPS, false, false, false, false, false, 0, "fast-mipmaps",
+ 0,
+ "If resizing an image, use the old fast resize algorithm (default"
+ " until v1.64a) instead of the new smart one. Both algorithms differ"
+ " only, when creating a mipmap for images with odd width or odd"
+ " height. The old algorithm is faster (factor 2-4) than the default"
+ " algorithm, but the new algorithm creates better resized images. See"
+ " https://szs.wiimm.de/doc/img/resize for details. --fast-mm is a"
+ " short cut."
+ },
+
+ { OPT_CMPR_DEFAULT, false, false, false, false, false, 0, "cmpr-default",
+ "rgb1[,rgb2]",
+ "Define 2 colors for the case, that all 16 pixels of a CMPR block are"
+ " transparent. The default is to calculate an average color of all"
+ " transparent pixels. Before v2.04 white was used.\n"
+ " 2 RGB values (hex values with 6 digits each) are expected as"
+ " parameter. If optional RGB2 is missed, a copy of RGB1 is used. As"
+ " first step, both colors are converted to RGB565 colors C1 and C2 and"
+ " sorted, so that C1<C2 (mandatory for CMPR). If C1 and C2 are"
+ " identical, the least significant bit of green is cleared for C1 and"
+ " set for C2.\n"
+ " Use parameter '0' to force black, '-1' to force white, or '-' to"
+ " reset to auto calculation."
+ },
+
+ { OPT_CUT, false, false, false, false, false, 0, "cut",
+ 0,
+ "Cut different non archive files into smaller peaces (logical units"
+ " like headers, groups, sections) or list these peaces as single sub"
+ " files for a more detailed analysis. Supported file types are BMG,"
+ " BREFT-IMG, KMP, PAT, TEX, TPL, BRRES sub files and more."
+ },
+
+ { OPT_ALL, false, false, false, false, false, 'a', "all",
+ 0,
+ "Extract and decode all known and supported files recursively. This is"
+ " a short cut for '--recurse --decode --mipmaps'. If entered twice,"
+ " option --cut is included too."
+ },
+
+ { OPT_RAW, false, false, false, false, false, 0, "raw",
+ 0,
+ "Extract BRRES sub file in raw mode and do not adjust string pointers"
+ " and other offsets."
+ },
+
+ { OPT_SECTIONS, false, false, false, false, true, 0, "sections",
+ 0,
+ "Print in machine readable sections and parameter lines."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0}, // OPT__N_SPECIFIC == 130
+
+ //----- global options -----
+
+ { OPT_VERSION, false, false, false, false, false, 'V', "version",
+ 0,
+ "Stop parsing the command line, print a version info and exit."
+ },
+
+ { OPT_HELP, false, false, false, false, false, 'h', "help",
+ 0,
+ "Stop parsing the command line, print a help message and exit."
+ },
+
+ { OPT_XHELP, false, false, false, false, false, 0, "xhelp",
+ 0,
+ "Stop parsing the command line and print a help message with all"
+ " commands included. Exit after printing."
+ },
+
+ { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all",
+ 0,
+ "Usually commands accept only options with impact to the command. All"
+ " other options fire a syntax error. But if --allow-all is set, all"
+ " commands accept all options.\n"
+ " This makes changing the command of a long command line without"
+ " removing useless options easier. It also helps to override wrong"
+ " option permissions."
+ },
+
+ { OPT_COMPATIBLE, false, false, false, false, false, 0, "compatible",
+ "vers",
+ "The option expects a version number (format '#.##' or 'v#.##') or a"
+ " revision number (format 'r#') as parameter. If set, the tools try to"
+ " create BMG and KMP text files, that are compatible to the entered"
+ " version of the tools. This may override other legacy options."
+ },
+
+ { OPT_WIDTH, false, false, false, true, false, 0, "width",
+ "width",
+ "Define the terminal width (number of columns) for help and some other"
+ " messages and disable the automatic detection of the terminal width."
+ },
+
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet and print only error messages. Multiple usage is possible."
+ " The impact is command dependent. In general: If set three times,"
+ " different file format warnings are suppressed."
+ },
+
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Be verbose and print more progress information. Multiple usage is"
+ " possible. The impact is command dependent."
+ },
+
+ { OPT_LOGGING, false, false, false, false, false, 'L', "logging",
+ 0,
+ "This debug option enables the logging of internal lists and maps."
+ },
+
+ { OPT_DE, false, false, false, false, false, 0, "de",
+ 0,
+ "Use german track and arena names."
+ },
+
+ { OPT_COLORS, true, false, false, true, false, 0, "colors",
+ "[=modus]",
+ "Define the modus for colored text output. Allowed keywords are: OFF"
+ " or NO-COLORS to disable colors, AUTO (default) for automatic"
+ " detection, ON for automatic detection but never OFF, 8-COLORS and"
+ " 256-COLORS to force 8 or 256 color support. Without parameter, ON is"
+ " used.\n"
+ " AUTO will enable colorized output only for terminals. AUTO and ON"
+ " use environment variable TERM to find the correct color modus.\n"
+ " If a command is prefixed by 'C-', then --color=ON is used"
+ " implicitly as default."
+ },
+
+ { OPT_NO_COLORS, false, false, false, true, false, 0, "no-colors",
+ 0,
+ "Deactive colorized text. This is the default, if an output file is"
+ " not a terminal."
+ },
+
+ { OPT_CT_CODE, false, false, false, false, false, 0, "ct-code",
+ 0,
+ "Enable CT-CODE support. See https://szs.wiimm.de/opt/ctcode for"
+ " details."
+ },
+
+ { OPT_LE_CODE, true, false, false, false, false, 0, "le-code",
+ "[=param]",
+ "Enable LE-CODE and CT-CODE support. The optional parameter is"
+ " deprecated and ignored. See https://szs.wiimm.de/opt/lecode for"
+ " details."
+ },
+
+ { OPT_CHDIR, false, false, false, false, false, 0, "chdir",
+ "dir",
+ "Set a new working directory for all following options, for all"
+ " parameters and for the command execution. This option can be used"
+ " multiple times, but for parameter parsing and for command execution"
+ " only the last usage is relevant. Nevertheless, '@param' values are"
+ " scanned while reading the command line."
+ },
+
+ { OPT_CONST, false, false, false, false, false, 'c', "const",
+ "list",
+ "Define constant values, that are used by the internal encoders and by"
+ " the numeric options as predefined global variables. This option"
+ " allows a conditional encoding of text files. It can be used multiple"
+ " times for multiple definitions.\n"
+ " The parameter is a comma separated list of terms and a term is"
+ " 'name=expression'. The expression is calculated by the text parser."
+ },
+
+ { OPT_BATTLE, true, false, false, false, false, 0, "battle",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used.\n"
+ " If mode is ON, assume a battle arena and enable a spüecial battle"
+ " support. If mode is OFF, disable special battle arena support. If"
+ " mode is AUTO, analyse the KMP and estimate, if it is a battle"
+ " areana. Modes ON and OFF override KMP parameter BATTLE-MODE."
+ },
+
+ { OPT_EXPORT_FLAGS, true, false, false, false, false, 0, "export-flags",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used."
+ " --exflags is an alternative name for the option.\n"
+ " If mode is ON, this feature is forced: On creating a KMP text file,"
+ " the option EXPORT-FLAGS is always set to 1. On creating a binary KMP"
+ " file, the flags are always exported as lowest byte of the scale"
+ " factors or x-rotation.\n"
+ " If mode is OFF, this feature is totally disabled. If mode is not"
+ " AUTO, KMP parameter EXPORT-FLAGS is overridden."
+ },
+
+ { OPT_ROUTE_OPTIONS, true, false, false, false, false, 0, "route-options",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used.\n"
+ " On mode ON, the new commands $PREV and $NEXT are printed for each"
+ " group of KMP sections ENPT and ITPT. On mode AUTO, the command is"
+ " only printed, if any option is set or if parameter SHOW-OPTIONS is"
+ " >0. On mode OFF, this feature is totally disabled to create KMP text"
+ " files that are compatible with versions <1.60a.\n"
+ " This option exists only for a transition period. Its behaviour will"
+ " be changed in the future. --ropt is a short cut."
+ },
+
+ { OPT_WIM0, true, false, false, false, false, 0, "wim0",
+ "[=mode]",
+ "MODE is either OFF, AUTO (default) or ON. Without value, ON is used.\n"
+ " If mode is ON, a KMP section called WIM0 is added on binary KMP"
+ " creation. The sections contains information for Wiimms tools.\n"
+ " If mode is OFF, this feature is totally disabled. If mode is not"
+ " AUTO, KMP parameter KMP-WIM0 is overridden."
+ },
+
+ { OPT_LOAD_KCL, false, false, false, false, false, 0, "load-kcl",
+ "file",
+ "Load a KCL or OBJ file for reference issues."
+ },
+
+ { OPT_KCL, false, false, false, false, false, 0, "kcl",
+ "list",
+ "Set global options for KCL processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " Keywords SMALL, MEDIUM and CHARY select the default parameters for"
+ " the octree creation. The other allowed keywords are: FAST, NEW,"
+ " CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP, G, USEMTL,"
+ " CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED, DROP-FIXED,"
+ " DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL, CONV-FACEUP,"
+ " WEAK-WALLS, SORT, INPLACE, SILENT and LOG. See"
+ " https://szs.wiimm.de/opt/kcl for details."
+ },
+
+ { OPT_TRI_AREA, false, false, false, false, false, 0, "tri-area",
+ "EXPR",
+ "Define the minimal area size of KCL triangles. The intention is to"
+ " ignore triangles that are generally to small. EXPR is a floating"
+ " point number or expression. Triangles are invalidated if their area"
+ " size is smaller than EXPR. The test is executed after reading files,"
+ " after transformations, and after calculating normals and lengths."
+ " Values between 0.01 and 4.0 are recommended. The careful value 1.0"
+ " is used as default. Value 0 disables this filter functionality."
+ },
+
+ { OPT_TRI_HEIGHT, false, false, false, false, false, 0, "tri-height",
+ "EXPR",
+ "Define the minimal height of KCL triangles. The intention is to"
+ " ignore deformed triangles (very slim, but long). EXPR is a floating"
+ " point number or expression. Triangles are invalidated if at least 1"
+ " of the 3 heights is smaller than EXPR. The test is executed after"
+ " reading files, after transformations, and after calculating normals"
+ " and lengths. Values between 0.01 and 2.0 are recommended. The"
+ " careful value 1.0 is used as default. Value 0 disables this filter"
+ " functionality.\n"
+ " --tri-ht is an alternative name for the option."
+ },
+
+ { OPT_XTRIDATA, true, true, false, false, false, 0, "xtridata",
+ "[=level]",
+ "Enable extended KCL triangles tests. The default level is 1."
+ },
+
+ { OPT_KMP, false, false, false, false, false, 0, "kmp",
+ "list",
+ "Set global options for KMP processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " The other allowed keywords are: FORCE, NEW, RM-SPCITEM, LEFT, RIGHT,"
+ " WIDE, NARROW, FIX-CKPH, FIX-ENPH, FIX-ITPH, FIX-PH, FIX-CKNEXT,"
+ " FIX-CKJGPT, FIX-CK, FIX-ALL, MASK-PFLAGS, RM-LECODE, PURGE-GOBJ,"
+ " FULL-DEFOBJ, DUMP-CLASS, DUMP-ONEWAY, DUMP-ALL, 1LAP ... 9LAPS,"
+ " MAX-LAPS, RM-EMPTY, INPLACE, SILENT and LOG. See"
+ " https://szs.wiimm.de/opt/kmp for details."
+ },
+
+ { OPT_SPEED_MOD, false, false, false, false, false, 0, "speed-mod",
+ "factor",
+ "The speed modifier is a user extensions to change the basic speed of"
+ " all vehicles. The speed factor itself is stored into KMP:STGI"
+ " section of a track.\n"
+ " If --speed-mod is set to a value >0.0, then the last 2 bytes of"
+ " the STGI section are patched. The value 0.0 reset these 2 bytes and"
+ " deactivates the speed modifier."
+ },
+
+ { OPT_KTPT2, false, false, false, false, false, 0, "ktpt2",
+ "vector",
+ "Insert or replace a second KTPT. Use VECTOR as new position. VECTOR"
+ " is either X,Z or X,Y,Z or an expression. Set Y to 0 for an automatic"
+ " defined height.\n"
+ " If the first 4 characters of VECTOR are 'AUTO' (ignoring case),"
+ " then the position is calculated automatically and set to the"
+ " recommendation of command wkmpt KTPT.\n"
+ " The tool looks for the nearest lap counter (CKPT with mode 0) and"
+ " adjust the KTPT: The direction of the lap counter is copied and the"
+ " KTPT is moved to the lap counter line using the new direction.\n"
+ " LE-CODE uses the second KTPT to draw the finish line at another"
+ " place away from the start position."
+ },
+
+ { OPT_TFORM_KMP, false, false, false, false, false, 0, "tform-kmp",
+ "list",
+ "Select KMP sections and objects for a transformation. --tkmp is a"
+ " short cut. The option expects a comma separated list of keywords."
+ " Non ambiguous of keywords are allowed and minus signs within"
+ " keywords are optional (e.g. GOBJS). A minus sign before a keyword"
+ " disables transformation of the related section or object.\n"
+ " Sections are selected by the KMP section names AREA, CAME, CKPT,"
+ " CNPT, ENPT, GOBJ, ITPT, JGPT, KTPT, MSPT and POTI.\n"
+ " Objects are selected by the keywords AREA-POSITION, AREA-ROTATE,"
+ " AREA-SCALE, CAME-POSITION, CKPT-POSITION, CNPT-POSITION,"
+ " CNPT-ROTATE, ENPT-POSITION, ENPT-SCALE, GOBJ-POSITION, GOBJ-ROTATE,"
+ " GOBJ-SCALE, ITPT-POSITION, ITPT-SCALE, JGPT-POSITION, JGPT-ROTATE,"
+ " KTPT-POSITION, KTPT-ROTATE, MSPT-POSITION, MSPT-ROTATE and"
+ " POTI-POSITION.\n"
+ " The keywords NONE and ALL (default) complete the field."
+ },
+
+ { OPT_MDL, false, false, false, false, false, 0, "mdl",
+ "list",
+ "Set global options for MDL processing. To enable MDL patching, use"
+ " option --patch-file and select BRRES files for patching.\n"
+ " Parameter 'list' is a comma separated list of keywords. A minus"
+ " sign before a keyword disables a setting. Each occurrence of the"
+ " option will only change entered settings and all other settings are"
+ " untouched.\n"
+ " A MDL transformation (controlled by the transformation options) is"
+ " only done, if at least one of the keywords VECTOR or VERTEX is set.\n"
+ " Keyword DEFAULT resets the default settings (VERTEX) and CLEAR"
+ " disables all. The other allowed keywords are: VECTOR, MATRIX,"
+ " VERTEX, PARENT, CHILD and LOG. See https://szs.wiimm.de/opt/mdl for"
+ " details."
+ },
+
+ { OPT_PAT, false, false, false, false, false, 0, "pat",
+ "list",
+ "Set global options for PAT processing. Parameter 'list' is a comma"
+ " separated list of keywords. A minus sign before a keyword disables a"
+ " setting. Each occurrence of the option will only change entered"
+ " settings and all other settings are untouched.\n"
+ " Keyword DEFAULT resets the default settings and CLEAR disables all."
+ " The other allowed keywords are: AUTO, SIMPLE, COMPLEX, BOTH, SILENT"
+ " and LOG. See https://szs.wiimm.de/opt/pat for details."
+ },
+
+ { OPT_PATCH_FILE, false, false, false, false, false, 0, "patch-file",
+ "list",
+ "Define, which kind of KMP, KCL and BRRES/MDL files are objects for"
+ " patching. --pfile is a short cut.\n"
+ " Parameter 'list' is a comma separated list of keywords. A minus"
+ " sign before a keyword disables a setting. Each occurrence of the"
+ " option will only change entered settings and all other settings are"
+ " untouched.\n"
+ " Keyword DEFAULT resets the default settings (TRACK,LOG) and CLEAR"
+ " disables all. The other allowed keywords are: KMP, KCL, OTHER-KCL,"
+ " ALL-KCL, MODEL, MAP, VRCORN, OTHER-BRRES, ALL-BRRES, TRACK"
+ " (=KMP,KCL,MODEL,MAP,VRCORN), ALL, LOG and LOG-ALL. See"
+ " https://szs.wiimm.de/opt/patch for details."
+ },
+
+ { OPT_KMG_LIMIT, false, false, false, false, false, 0, "kmg-limit",
+ "seconds",
+ "Limit the run time for Ballon Battle and Coin Runners to the given"
+ " time in SECONDS. Smaller values are not changed. The limitation is"
+ " carried out after loading a binary file and before scanning a text"
+ " file. Value 0 disables this option."
+ },
+
+ { OPT_KMG_COPY, false, false, false, false, false, 0, "kmg-copy",
+ "id",
+ "Make all 10 slots of a KMG file equal after loading a binary file and"
+ " before scanning a text file. ID is either a slot index (0..9) or a"
+ " slot name (A11..A25) and declares the source slot. Value -1 disables"
+ " this option. If ID contains brackets [...], then it is analysed as"
+ " an arena name and the part between the brackets is searched for"
+ " attributes A11..A25."
+ },
+
+ { OPT_LT_CLEAR, false, false, false, false, false, 0, "lt-clear",
+ 0,
+ "Clear the LEX/TEST section and remove the section and course.lex if"
+ " empty. This option is executed before all other --lt-* options."
+ },
+
+ { OPT_LT_ONLINE, false, false, false, false, false, 0, "lt-online",
+ "mode",
+ "Set LEX/TEST parameter OFFLINE-ONLINE to this MODE. MODE is one of"
+ " AUTO (default), NEVER or ALWAYS. Only track.szs files are modified."
+ " If needed, file course.lex and section TEST are created or removed"
+ " if empty."
+ },
+
+ { OPT_LT_N_PLAYERS, false, false, false, false, false, 0, "lt-n-players",
+ "offline,online",
+ "Set LEX/TEST parameters N-OFFLINE and N-ONLINE to these integer"
+ " values. Only track.szs files are modified. If needed, file"
+ " course.lex and section TEST are created or removed if empty."
+ },
+
+ { OPT_LT_COND_BIT, false, false, false, false, false, 0, "lt-cond-bit",
+ "bitnum",
+ "Set LEX/TEST parameter COND-BIT to this integer value. Use -1 to"
+ " deactivate this COND-BIT. Only track.szs files are modified. If"
+ " needed, file course.lex and section TEST are created or removed if"
+ " empty."
+ },
+
+ { OPT_LT_GAME_MODE, false, false, false, false, false, 0, "lt-game-mode",
+ "mode",
+ "Set LEX/TEST parameter GAME-MODE to this MODE. MODE is one of AUTO"
+ " (default), BALLOON, COIN, VERSUS or ITEMRAIN. Only track.szs files"
+ " are modified. If needed, file course.lex and section TEST are"
+ " created or removed if empty."
+ },
+
+ { OPT_LT_ENGINE, false, false, false, false, false, 0, "lt-engine",
+ "mode",
+ "Set LEX/TEST parameter ENGINE to this MODE. MODE is one of AUTO"
+ " (default), BATTLE, 50CC, 100CC, 150CC, 200CC, 150M or 200M. Only"
+ " track.szs files are modified. If needed, file course.lex and section"
+ " TEST are created or removed if empty."
+ },
+
+ { OPT_LT_RANDOM, false, false, false, false, false, 0, "lt-random",
+ "index",
+ "Force a random scenario, if between 1 and 8. Value 0 enables auto"
+ " selection and -1 disables this option. Only track.szs files are"
+ " modified. If needed, file course.lex and section TEST are created or"
+ " removed if empty."
+ },
+
+ { OPT_LEX_PURGE, false, false, false, false, false, 0, "lex-purge",
+ 0,
+ "Delete LEX sections without any impact. Delete sub-file course.lex if"
+ " it no longer contains a section. This option is executed after all"
+ " --lt-* options."
+ },
+
+ { OPT_CACHE, false, false, false, false, false, 0, "cache",
+ "dir",
+ "Define a directory for a SZS cache.If creating a YAZ0 compressed file"
+ " with standard compression (level 9), the cache is searched for the"
+ " compressed version. File cache-content.txt is used as file list with"
+ " hash values. If the cache file is not found or the content differ,"
+ " the file is (re-)created and exit status 2=differ is returned.\n"
+ " Background: Loading a compressed SZS and content verification is"
+ " much faster than YAZ compression.\n"
+ " For legay reasons: If parameter DIR is a file, it is split into"
+ " directory and base name. The directory is used for the cache"
+ " directory and the base name for option --cname, but only if --cname"
+ " is not used."
+ },
+
+ { OPT_CNAME, false, false, false, false, false, 0, "cname",
+ "name",
+ "Name of the first cache file. This parameter overrides the generated"
+ " cache name. The name is used only once for the very first cache"
+ " candidate."
+ },
+
+ { OPT_MAX_FILE_SIZE, false, false, false, false, false, 'M', "max-file-size",
+ "size",
+ "This security option defines the maximum file size for input files;"
+ " larger files are ignored with a warning. The default unit is MiB and"
+ " the default size is 100 MiB; that should be enough for standard"
+ " usage."
+ },
+
+ { OPT_TRACKS, false, false, false, false, false, 'T', "tracks",
+ "tracks",
+ "Define a new track order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are track names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned track. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Tracks will only be exchanged so that always all tracks are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_ARENAS, false, false, false, false, false, 'A', "arenas",
+ "arenas",
+ "Define a new arena order. A comma separated list in the format [a=]b"
+ " or a:=b is expected. 'a' and 'b' are arena names or slot numbers."
+ " 'a' is the destination slot and 'b' the assigned arena. If 'a' is"
+ " omitted, the next slot is used; this means [a=]b,c,d is possible.\n"
+ " Arenas will only be exchanged so that always all arenas are"
+ " assigned. But if using ':=' the new slots are assigned without"
+ " exchanging and the old values are lost."
+ },
+
+ { OPT_AUTOADD_PATH, false, false, false, false, false, 0, "autoadd-path",
+ "directory",
+ "Define an alternative directory as autoadd library. The default is,"
+ " that the sub-directory called './auto-add/' of all search paths are"
+ " used. Use 'wszst test -vvvv' for tests."
+ },
+
+ { OPT_UTF_8, false, true, false, false, true, 0, "utf-8",
+ 0,
+ "Enables UTF-8 support for filenames (default)."
+ },
+
+ { OPT_NO_UTF_8, false, true, false, false, false, 0, "no-utf-8",
+ 0,
+ "Disables UTF-8 support for filenames."
+ },
+
+ { OPT_TEST, false, false, false, false, true, 't', "test",
+ 0,
+ "Run in test mode, modify nothing.\n"
+ ">>> USE THIS OPTION IF UNSURE! <<<"
+ },
+
+ { OPT_FORCE, false, false, false, false, false, 0, "force",
+ 0,
+ "The tools analyse input files and reject files with invalid data"
+ " structures. If --force is set, little repairable issues are ignored"
+ " and a warning is printed.\n"
+ "Option '--kmp force' does the same, but only for KMP files.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_REPAIR_MAGICS, true, false, false, false, false, 0, "repair-magics",
+ "[=mode]",
+ "Control the reparing of missing or wrong magics of files and"
+ " sub-files by analysing file path and file extension. MODE is one of"
+ " OFF (default), ANALYZE or REPAIR (default, if set without mode). OFF"
+ " disables this feature, ANALYZE enables it for analysis only, and"
+ " REPAIR repairs all magics while reading the files. Keyword FNAME can"
+ " be appended (separated by a comma) to give filename scanning the"
+ " highest priority.\n"
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<"
+ },
+
+ { OPT_TINY, false, false, false, false, false, 0, "tiny",
+ "mode",
+ "Set tiny mode to a level between 0 and 7. See"
+ " https://szs.wiimm.de/opt/tiny for details."
+ },
+
+ { OPT_YAZ0, false, false, false, false, false, 0, "yaz0",
+ 0,
+ "If creating a compressed file, force Yaz0 compression. Yaz0"
+ " compression is the default, if no compression method is defined by"
+ " option or setup file."
+ },
+
+ { OPT_YAZ1, false, false, false, false, false, 0, "yaz1",
+ 0,
+ "If creating a compressed file, force Yaz1 compression. The difference"
+ " to Yaz0 is only the magic, which is set to 'Yaz1'."
+ },
+
+ { OPT_XYZ, false, false, false, false, false, 0, "xyz",
+ 0,
+ "If creating a compressed file, force XYZ compression (an experimental"
+ " Yaz0 variant)."
+ },
+
+ { OPT_BZ, false, false, false, false, false, 0, "bz",
+ 0,
+ "If creating a compressed file, force BZ compression (a BZIP2"
+ " variant)."
+ },
+
+ { OPT_SH, false, false, false, false, true, 0, "sh",
+ 0,
+ "Dump info using SH syntax. Use '--var name' as prefix."
+ },
+
+ { OPT_BASH, false, false, false, false, false, 0, "bash",
+ 0,
+ "Dump info using BASH syntax. Use '--var name' as prefix."
+ },
+
+ { OPT_JSON, false, false, false, false, false, 0, "json",
+ 0,
+ "Dump info using JSON syntax. Options --var and --array are ignored."
+ },
+
+ { OPT_PHP, false, false, false, false, false, 0, "php",
+ 0,
+ "Dump infos using PHP syntax. Use '--var name' as variable name of the"
+ " resulting object."
+ },
+
+ { OPT_MAKEDOC, false, false, false, false, false, 0, "makedoc",
+ 0,
+ "Dump infos using MakeDoc syntax. Use '--var name' as variable name of"
+ " the resulting map."
+ },
+
+ { OPT_VAR, false, false, false, false, false, 0, "var",
+ "varname",
+ "Use VARNAME as variable name or prefix on script output. The default"
+ " variabe name is 'res'."
+ },
+
+ { OPT_ARRAY, false, false, false, false, false, 0, "array",
+ 0,
+ "Use an array on script output if possible. If arrays are not"
+ " supported, then append a '_#' suffix with an zero based index to the"
+ " variable name defined by '--var name'. In this case, only one output"
+ " file is created."
+ },
+
+ { OPT_AVAR, false, false, false, false, false, 0, "avar",
+ "varname",
+ "Shortcut for: '--array --var name'"
+ },
+
+ { OPT_OLD, false, true, false, false, false, 0, "OLD",
+ 0,
+ "Developer option: Cancel --NEW and use old implementation if"
+ " available."
+ },
+
+ { OPT_STD, false, true, false, false, false, 0, "STD",
+ 0,
+ "Developer option: Cancel --OLD and --NEW and use standard"
+ " implementation (default)."
+ },
+
+ { OPT_NEW, false, true, false, false, false, 0, "NEW",
+ 0,
+ "Developer option: Cancel --OLD and use new implementation if"
+ " available."
+ },
+
+ { OPT_EXTRACT, false, true, false, false, false, 0, "EXTRACT",
+ "dir",
+ "Create the directory and extract different objects in different"
+ " formats at the moment when they are seen. This is a development"
+ " helper option."
+ },
+
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 200
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// alternate option infos ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t option_grp_TEXTOUT_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in decoded text files."
+ };
+
+static const InfoOption_t option_grp_BMG_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print long numeric message IDs instead of alternative message names"
+ " like Txx, Uxx or Mxx."
+ };
+
+static const InfoOption_t option_grp_ENCODE_ALL =
+ { OPT_ALL, false, false, false, false, false, 'a', "all",
+ 0,
+ " Encode all files. This is a short cut for --encode-all (and more"
+ " options in the future)."
+ };
+
+static const InfoOption_t option_cmd_VERSION_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only the version number, revision and system. If set twice,"
+ " print only the version number."
+ };
+
+static const InfoOption_t option_cmd_VERSION_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print in long format. Ignored if option --sections is set."
+ };
+
+static const InfoOption_t option_cmd_TEST_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Print the matrices of transformations."
+ };
+
+static const InfoOption_t option_cmd_COLORS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print also a list of all colored text types. If set twice, include"
+ " alternative names. If set three times, include raw color names."
+ };
+
+static const InfoOption_t option_cmd_COLORS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Ignore option --long and print a single status line about current"
+ " color settings."
+ };
+
+static const InfoOption_t option_cmd_ERROR_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print message text instead of message name."
+ };
+
+static const InfoOption_t option_cmd_ERROR_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print message number instead of message name."
+ };
+
+static const InfoOption_t option_cmd_FILETYPE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print an additional column with the decompressed file type and"
+ " version. If entered twice, a validation status column is added."
+ };
+
+static const InfoOption_t option_cmd_BRSUB_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, print hints about unusual versions too. If set twice, print a"
+ " status line for each found BRRES sub file."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress the output of the description and print only function type"
+ " and syntax."
+ };
+
+static const InfoOption_t option_cmd_FUNCTIONS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Usually only the function syntax is compared to the keywords. But if"
+ " --long is set, the descriptions are compared too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set once, suppress vector dumps for transformation steps and"
+ " ignore option --long. If set twice, suppress vector dump for final"
+ " transformation too."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set once, print inverse matrix for the final transformation. If"
+ " set twice, print inverse matrix for all transformations."
+ };
+
+static const InfoOption_t option_cmd_MATRIX_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Option --quiet is dedicated to automatic tests comparing the old and"
+ " new transformation algorithms. If set once, the tables are only"
+ " printed, if the results differ. If set twice, nothing is printed at"
+ " all and only the exit status will inform about the results."
+ };
+
+static const InfoOption_t option_cmd_VR_CALC_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress header and print only results for VR_winner-VR_looser."
+ };
+
+static const InfoOption_t option_cmd_VR_RACE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print full matrix of delta values."
+ };
+
+static const InfoOption_t option_cmd_AUTOADD_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ " If set, suppress logging."
+ };
+
+static const InfoOption_t option_cmd_AUTOADD_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "If set, list all missed and invalid files of the current auto-add"
+ " archive after the adding operation. If set twice, then additionally"
+ " list all already existing files in the current auto-add archive."
+ };
+
+static const InfoOption_t option_cmd_AUTOADD_DEST =
+ { OPT_DEST, false, false, false, false, false, 'd', "dest",
+ "path",
+ "Define a destination directory as current auto-add archive. The"
+ " default is the standard auto-add path. Try AUTOADD without sources"
+ " to view the path."
+ };
+
+static const InfoOption_t option_cmd_AUTOADD_OVERWRITE =
+ { OPT_OVERWRITE, false, false, false, false, false, 'o', "overwrite",
+ 0,
+ "Overwrite already existing files instead of only adding new files to"
+ " the auto-add archive."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Print an additonally hex status value as second column before the"
+ " file name. These values can be used to find a selection mask."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_ALL =
+ { OPT_ALL, false, false, false, false, false, 'a', "all",
+ 0,
+ "Print the '_d' files too. If set twice, print all files (same as"
+ " -all)."
+ };
+
+static const InfoOption_t option_cmd_TRACKS_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Print 5 non track files too. If set twice, print 4 more files with"
+ " old BRRES sub file formats too."
+ };
+
+static const InfoOption_t option_cmd_LIST_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, the size of each file is printed. If set twice, offset and"
+ " size are printed. If set three times, debugging mode is enabled."
+ };
+
+static const InfoOption_t option_cmd_NAME_REF_SORT =
+ { OPT_SORT, false, false, false, false, false, 'S', "sort",
+ "mode",
+ "Define the sort order of the reference. NONE (default) uses the order"
+ " of the string pool. BRRES orders in standard BRRES order by ASCCI"
+ " value and case sensitive. NAME similar to BRRES, but case"
+ " insensitive. OFFSET orders by the file offset of first usage."
+ };
+
+static const InfoOption_t option_cmd_NAME_REF_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set, suppress the offsets of the strings. This makes comparisons"
+ " after name changes easier. If set twice, suppress reference offsets"
+ " too. If set 3 times, suppress all offsets."
+ };
+
+static const InfoOption_t option_cmd_NAME_REF_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, a list ordered by NAME or BRRES (default) and a second list"
+ " ordered by OFFSET is printed. If set twice, a third list with order"
+ " NONE is appended."
+ };
+
+static const InfoOption_t option_cmd_ILIST_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, image width, height and size are printed. If set twice, a"
+ " block info and attribites are printed too."
+ };
+
+static const InfoOption_t option_cmd_MEMORY_DECODE =
+ { OPT_DECODE, false, false, false, false, false, 0, "decode",
+ 0,
+ "Decode binary files to find memory addresses of sections."
+ };
+
+static const InfoOption_t option_cmd_MEMORY_MIPMAPS =
+ { OPT_MIPMAPS, false, false, false, false, false, 0, "mipmaps",
+ 0,
+ "Analyze images and dump mipmap adresses too."
+ };
+
+static const InfoOption_t option_cmd_MEMORY_ALL =
+ { OPT_ALL, false, false, false, false, false, 'a', "all",
+ 0,
+ "A short cut for '--recurse --decode --mipmaps'. If entered twice,"
+ " option --cut is included too."
+ };
+
+static const InfoOption_t option_cmd_MEMORY_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, print absolute offsets too."
+ };
+
+static const InfoOption_t option_cmd_SHA1_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress output of the filename."
+ };
+
+static const InfoOption_t option_cmd_SHA1_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set and --db64 is not active, start the line with the length of"
+ " the decompressed source as decimal number (field width 9) separated"
+ " with a comma from the SHA1 checksum. If set twice, prefix each line"
+ " with the modification time in the format 'yyyy-mm-dd HH:MM:SS '.\n"
+ " If set and --db64 is active, then CKPT lap counter, STGI lap"
+ " counter, speed factor and slot info are inserted beteen checksum and"
+ " filename. All columns are separated by one or two spaces."
+ };
+
+static const InfoOption_t option_cmd_ANALYZE_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Append a list of special files with size, SHA1 and file name."
+ };
+
+static const InfoOption_t option_cmd_ANALYZE_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Suppress logging of input and output files."
+ };
+
+static const InfoOption_t option_cmd_DISTRIBUTION_SOURCE =
+ { OPT_SOURCE, false, false, false, false, false, 's', "source",
+ "path",
+ "Define a text file for filename to slot translation. A »slot"
+ " filename« list is expected. Use this option multiple times to"
+ " define more than one source file. A definition of a later source"
+ " overwrites previous definitions. The file RESULT of the command line"
+ " is appended automatically as last entry, if exists and not already"
+ " included."
+ };
+
+static const InfoOption_t option_cmd_DIFF_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "If set once, only a summary status for each section is printed. If"
+ " set twice, only a total summary status is printed. If set three"
+ " times, the status is only reported as exit status."
+ };
+
+static const InfoOption_t option_cmd_CHECK_NO_CHECK =
+ { OPT_NO_CHECK, false, false, false, false, false, 'N', "no-check",
+ 0,
+ "Don't check the KCL and KMP files."
+ };
+
+static const InfoOption_t option_cmd_CHECK_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print only warnings and suppress hints."
+ };
+
+static const InfoOption_t option_cmd_CHECK_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "Be verbose and print more statistics."
+ };
+
+static const InfoOption_t option_cmd_CHECK_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Be quiet until the first warning or hint is found."
+ };
+
+static const InfoOption_t option_cmd_SLOTS_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Print the slot list in a compressed form without spaces."
+ };
+
+static const InfoOption_t option_cmd_STGI_IGNORE =
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "If set, ignore non existing source files and files without KMP"
+ " without warning. If set twice, ignore files with standard settings"
+ " too."
+ };
+
+static const InfoOption_t option_cmd_ISARENA_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "If set, suppress the output of header and filenames."
+ };
+
+static const InfoOption_t option_cmd_ISARENA_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "If set, print nothing and set only the exit status."
+ };
+
+static const InfoOption_t option_cmd_ISARENA_IGNORE =
+ { OPT_IGNORE, false, false, false, false, false, 'i', "ignore",
+ 0,
+ "If set, ignore non existing source files and files without KMP"
+ " without warning."
+ };
+
+static const InfoOption_t option_cmd_MINIMAP_LONG =
+ { OPT_LONG, false, false, false, false, false, 'l', "long",
+ 0,
+ "If set, print the matrices too. If set twice, print minimum and"
+ " maximum values too."
+ };
+
+static const InfoOption_t option_cmd_BMG_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in decoded text files."
+ };
+
+static const InfoOption_t option_cmd_KCL_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in decoded text files."
+ };
+
+static const InfoOption_t option_cmd_KMP_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in decoded text files."
+ };
+
+static const InfoOption_t option_cmd_LEX_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress the syntax information section in decoded text files."
+ };
+
+static const InfoOption_t option_cmd_INFO_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress output of the printed filename."
+ };
+
+static const InfoOption_t option_cmd_GHOST_NO_HEADER =
+ { OPT_NO_HEADER, false, false, false, false, false, 'H', "no-header",
+ 0,
+ "Suppress output of the printed filename."
+ };
+
+static const InfoOption_t option_cmd_VEHICLE_SOURCE =
+ { OPT_SOURCE, false, false, false, false, false, 's', "source",
+ "path",
+ "Load the file instead of using the internal base."
+ };
+
+static const InfoOption_t option_cmd_VEHICLE_DEST =
+ { OPT_DEST, false, false, false, false, false, 'd', "dest",
+ "path",
+ "Define a destination path (directory/file). The destination - means:"
+ " write to standard output."
+ };
+
+static const InfoOption_t option_cmd_VEHICLE_QUIET =
+ { OPT_QUIET, false, false, false, false, false, 'q', "quiet",
+ 0,
+ "Suppress logging."
+ };
+
+static const InfoOption_t option_cmd_VEHICLE_VERBOSE =
+ { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose",
+ 0,
+ "Log patching."
+ };
+
+static const InfoOption_t option_cmd_VEHICLE_BRIEF =
+ { OPT_BRIEF, false, false, false, false, false, 'B', "brief",
+ 0,
+ "Suppress min/max counts on dumps."
+ };
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// CommandTab[] ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const KeywordTab_t CommandTab[] =
+{
+ { CMD_VERSION, "VERSION", 0, 0 },
+ { CMD_HELP, "HELP", "H", 0 },
+ { CMD_HELP, "?", 0, 0 },
+ { CMD_ARGTEST, "ARGTEST", 0, 0 },
+ { CMD_TEST, "TEST", 0, 0 },
+ { CMD_COLORS, "COLORS", 0, 0 },
+ { CMD_ERROR, "ERROR", "ERR", 0 },
+ { CMD_FILETYPE, "FILETYPE", "FT", 0 },
+ { CMD_FILEATTRIB, "FILEATTRIB", "FA", 0 },
+ { CMD_BRSUB, "BRSUB", 0, 0 },
+ { CMD_SYMBOLS, "SYMBOLS", 0, 0 },
+ { CMD_FUNCTIONS, "FUNCTIONS", 0, 0 },
+ { CMD_CALCULATE, "CALCULATE", 0, 0 },
+ { CMD_MATRIX, "MATRIX", 0, 0 },
+ { CMD_FLOAT, "FLOAT", 0, 0 },
+ { CMD_VR_CALC, "VR-CALC", "VRCALC", 0 },
+ { CMD_VR_RACE, "VR-RACE", "VRRACE", 0 },
+ { CMD_AUTOADD, "AUTOADD", 0, 0 },
+ { CMD_TRACKS, "TRACKS", 0, 0 },
+ { CMD_SCANCACHE, "SCANCACHE", 0, 0 },
+ { CMD_EXPORT, "_EXPORT", 0, 0 },
+ { CMD_CODE, "_CODE", 0, 0 },
+ { CMD_RECODE, "_RECODE", 0, 0 },
+ { CMD_SUBFILE, "_SUBFILE", 0, 0 },
+ { CMD_LIST, "LIST", "LS", 0 },
+ { CMD_LIST_L, "LIST-L", "LL", 0 },
+ { CMD_LIST_L, "LISTL", 0, 0 },
+ { CMD_LIST_LL, "LIST-LL", "LLL", 0 },
+ { CMD_LIST_LL, "LISTLL", 0, 0 },
+ { CMD_LIST_LLL, "LIST-LLL", "LLLL", 0 },
+ { CMD_LIST_LLL, "LISTLLL", 0, 0 },
+ { CMD_LIST_A, "LIST-A", "LA", 0 },
+ { CMD_LIST_A, "LISTA", 0, 0 },
+ { CMD_LIST_LA, "LIST-LA", "LLA", 0 },
+ { CMD_LIST_LA, "LISTLA", 0, 0 },
+ { CMD_NAME_REF, "NAME-REF", "NAMEREF", 0 },
+ { CMD_ILIST, "ILIST", "IL", 0 },
+ { CMD_ILIST_L, "ILIST-L", "ILL", 0 },
+ { CMD_ILIST_L, "ILISTL", 0, 0 },
+ { CMD_ILIST_LL, "ILIST-LL", "ILLL", 0 },
+ { CMD_ILIST_LL, "ILISTLL", 0, 0 },
+ { CMD_ILIST_A, "ILIST-A", "ILA", 0 },
+ { CMD_ILIST_LA, "ILIST-LA", "ILLA", 0 },
+ { CMD_ILIST_LA, "ILISTLA", 0, 0 },
+ { CMD_MEMORY, "MEMORY", "MEM", 0 },
+ { CMD_MEMORY_A, "MEMORY-A", "MEMA", 0 },
+ { CMD_DUMP, "DUMP", 0, 0 },
+ { CMD_SHA1, "SHA1", 0, 0 },
+ { CMD_ANALYZE, "ANALYZE", "ANA", 0 },
+ { CMD_ANALYZE, "ANALYSE", 0, 0 },
+ { CMD_DISTRIBUTION, "DISTRIBUTION", "DIST", 0 },
+ { CMD_DIFF, "DIFF", "CMP", 0 },
+ { CMD_CHECK, "CHECK", 0, 0 },
+ { CMD_SLOTS, "SLOTS", 0, 0 },
+ { CMD_STGI, "STGI", 0, 0 },
+ { CMD_ISARENA, "ISARENA", 0, 0 },
+ { CMD_NORMALIZE, "NORMALIZE", "NORM", 0 },
+ { CMD_PATCH, "PATCH", 0, 0 },
+ { CMD_COPY, "COPY", "CP", 0 },
+ { CMD_DUPLICATE, "DUPLICATE", "DUP", 0 },
+ { CMD_MINIMAP, "MINIMAP", 0, 0 },
+ { CMD_COMPRESS, "COMPRESS", "COM", 0 },
+ { CMD_DECOMPRESS, "DECOMPRESS", "DEC", 0 },
+ { CMD_ENCODE, "ENCODE", "E", 0 },
+ { CMD_CREATE, "CREATE", "C", 0 },
+ { CMD_UPDATE, "UPDATE", "U", 0 },
+ { CMD_EXTRACT, "EXTRACT", "X", 0 },
+ { CMD_XDECODE, "XDECODE", "XD", 0 },
+ { CMD_XEXPORT, "XEXPORT", "XX", 0 },
+ { CMD_XALL, "XALL", "XA", 0 },
+ { CMD_XCOMMON, "XCOMMON", 0, 0 },
+ { CMD_BINARY, "BINARY", "BIN", 0 },
+ { CMD_TEXT, "TEXT", "TXT", 0 },
+ { CMD_CAT, "CAT", 0, 0 },
+ { CMD_BMG, "BMG", 0, 0 },
+ { CMD_KCL, "KCL", 0, 0 },
+ { CMD_KMP, "KMP", 0, 0 },
+ { CMD_LEX, "LEX", 0, 0 },
+ { CMD_INFO, "INFO", 0, 0 },
+ { CMD_GHOST, "GHOSTS", 0, 0 },
+ { CMD_YAZDUMP, "YAZDUMP", "YD", 0 },
+ { CMD_VEHICLE, "VEHICLE", 0, 0 },
+
+ { CMD__N,0,0,0 }
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionShort & OptionLong ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const char OptionShort[] = "VhqvLc:lHB1XPS:M:T:A:x:ts:d:D:E:orupiNC:nRea";
+
+static const struct option OptionLong[] =
+{
+ { "version", 0, 0, 'V' },
+ { "help", 0, 0, 'h' },
+ { "xhelp", 0, 0, GO_XHELP },
+ { "allow-all", 0, 0, GO_ALLOW_ALL },
+ { "allowall", 0, 0, GO_ALLOW_ALL },
+ { "compatible", 1, 0, GO_COMPATIBLE },
+ { "width", 1, 0, GO_WIDTH },
+ { "quiet", 0, 0, 'q' },
+ { "verbose", 0, 0, 'v' },
+ { "logging", 0, 0, 'L' },
+ { "de", 0, 0, GO_DE },
+ { "colors", 2, 0, GO_COLORS },
+ { "no-colors", 0, 0, GO_NO_COLORS },
+ { "nocolors", 0, 0, GO_NO_COLORS },
+ { "ct-code", 0, 0, GO_CT_CODE },
+ { "ctcode", 0, 0, GO_CT_CODE },
+ { "le-code", 2, 0, GO_LE_CODE },
+ { "lecode", 2, 0, GO_LE_CODE },
+ { "chdir", 1, 0, GO_CHDIR },
+ { "const", 1, 0, 'c' },
+ { "touch", 0, 0, GO_TOUCH },
+ { "auto", 0, 0, GO_AUTO },
+ { "set-flags", 1, 0, GO_SET_FLAGS },
+ { "setflags", 1, 0, GO_SET_FLAGS },
+ { "set-scale", 1, 0, GO_SET_SCALE },
+ { "setscale", 1, 0, GO_SET_SCALE },
+ { "set-rot", 1, 0, GO_SET_ROT },
+ { "setrot", 1, 0, GO_SET_ROT },
+ { "set-x", 1, 0, GO_SET_X },
+ { "setx", 1, 0, GO_SET_X },
+ { "set-y", 1, 0, GO_SET_Y },
+ { "sety", 1, 0, GO_SET_Y },
+ { "set-z", 1, 0, GO_SET_Z },
+ { "setz", 1, 0, GO_SET_Z },
+ { "xcenter", 0, 0, GO_XCENTER },
+ { "ycenter", 0, 0, GO_YCENTER },
+ { "zcenter", 0, 0, GO_ZCENTER },
+ { "center", 0, 0, GO_CENTER },
+ { "scale", 1, 0, GO_SCALE },
+ { "shift", 1, 0, GO_SHIFT },
+ { "xss", 1, 0, GO_XSS },
+ { "yss", 1, 0, GO_YSS },
+ { "zss", 1, 0, GO_ZSS },
+ { "rot", 1, 0, GO_ROT },
+ { "xrot", 1, 0, GO_XROT },
+ { "yrot", 1, 0, GO_YROT },
+ { "hrot", 1, 0, GO_YROT },
+ { "zrot", 1, 0, GO_ZROT },
+ { "ypos", 1, 0, GO_YPOS },
+ { "translate", 1, 0, GO_TRANSLATE },
+ { "trans", 1, 0, GO_TRANSLATE },
+ { "null", 0, 0, GO_NULL },
+ { "next", 0, 0, GO_NEXT },
+ { "ascale", 1, 0, GO_ASCALE },
+ { "arot", 1, 0, GO_AROT },
+ { "tform-script", 1, 0, GO_TFORM_SCRIPT },
+ { "tformscript", 1, 0, GO_TFORM_SCRIPT },
+ { "minimap", 0, 0, GO_MINIMAP },
+ { "rm-gobj", 1, 0, GO_RM_GOBJ },
+ { "rmgobj", 1, 0, GO_RM_GOBJ },
+ { "battle", 2, 0, GO_BATTLE },
+ { "export-flags", 2, 0, GO_EXPORT_FLAGS },
+ { "exportflags", 2, 0, GO_EXPORT_FLAGS },
+ { "exflags", 2, 0, GO_EXPORT_FLAGS },
+ { "route-options", 2, 0, GO_ROUTE_OPTIONS },
+ { "routeoptions", 2, 0, GO_ROUTE_OPTIONS },
+ { "ropt", 2, 0, GO_ROUTE_OPTIONS },
+ { "wim0", 2, 0, GO_WIM0 },
+ { "slot", 1, 0, GO_SLOT },
+ { "load-kcl", 1, 0, GO_LOAD_KCL },
+ { "loadkcl", 1, 0, GO_LOAD_KCL },
+ { "kcl", 1, 0, GO_KCL },
+ { "kcl-flag", 1, 0, GO_KCL_FLAG },
+ { "kclflag", 1, 0, GO_KCL_FLAG },
+ { "kcl-script", 1, 0, GO_KCL_SCRIPT },
+ { "kclscript", 1, 0, GO_KCL_SCRIPT },
+ { "tri-area", 1, 0, GO_TRI_AREA },
+ { "triarea", 1, 0, GO_TRI_AREA },
+ { "tri-height", 1, 0, GO_TRI_HEIGHT },
+ { "triheight", 1, 0, GO_TRI_HEIGHT },
+ { "tri-ht", 1, 0, GO_TRI_HEIGHT },
+ { "triht", 1, 0, GO_TRI_HEIGHT },
+ { "flag-file", 1, 0, GO_FLAG_FILE },
+ { "flagfile", 1, 0, GO_FLAG_FILE },
+ { "xtridata", 2, 0, GO_XTRIDATA },
+ { "xtri", 2, 0, GO_XTRIDATA },
+ { "kmp", 1, 0, GO_KMP },
+ { "speed-mod", 1, 0, GO_SPEED_MOD },
+ { "speedmod", 1, 0, GO_SPEED_MOD },
+ { "ktpt2", 1, 0, GO_KTPT2 },
+ { "tform-kmp", 1, 0, GO_TFORM_KMP },
+ { "tformkmp", 1, 0, GO_TFORM_KMP },
+ { "tkmp", 1, 0, GO_TFORM_KMP },
+ { "repair-xpflags", 1, 0, GO_REPAIR_XPF },
+ { "repairxpflags", 1, 0, GO_REPAIR_XPF },
+ { "repxpf", 1, 0, GO_REPAIR_XPF },
+ { "gamemodes", 1, 0, GO_GAMEMODES },
+ { "gmodes", 1, 0, GO_GAMEMODES },
+ { "mdl", 1, 0, GO_MDL },
+ { "pat", 1, 0, GO_PAT },
+ { "patch-file", 1, 0, GO_PATCH_FILE },
+ { "patchfile", 1, 0, GO_PATCH_FILE },
+ { "pfile", 1, 0, GO_PATCH_FILE },
+ { "kmg-limit", 1, 0, GO_KMG_LIMIT },
+ { "kmglimit", 1, 0, GO_KMG_LIMIT },
+ { "kmg-copy", 1, 0, GO_KMG_COPY },
+ { "kmgcopy", 1, 0, GO_KMG_COPY },
+ { "lt-clear", 0, 0, GO_LT_CLEAR },
+ { "ltclear", 0, 0, GO_LT_CLEAR },
+ { "lt-online", 1, 0, GO_LT_ONLINE },
+ { "ltonline", 1, 0, GO_LT_ONLINE },
+ { "lt-n-players", 1, 0, GO_LT_N_PLAYERS },
+ { "lt-nplayers", 1, 0, GO_LT_N_PLAYERS },
+ { "ltnplayers", 1, 0, GO_LT_N_PLAYERS },
+ { "lt-cond-bit", 1, 0, GO_LT_COND_BIT },
+ { "lt-condbit", 1, 0, GO_LT_COND_BIT },
+ { "ltcondbit", 1, 0, GO_LT_COND_BIT },
+ { "lt-game-mode", 1, 0, GO_LT_GAME_MODE },
+ { "lt-gamemode", 1, 0, GO_LT_GAME_MODE },
+ { "ltgamemode", 1, 0, GO_LT_GAME_MODE },
+ { "lt-engine", 1, 0, GO_LT_ENGINE },
+ { "ltengine", 1, 0, GO_LT_ENGINE },
+ { "lt-random", 1, 0, GO_LT_RANDOM },
+ { "ltrandom", 1, 0, GO_LT_RANDOM },
+ { "lex-purge", 0, 0, GO_LEX_PURGE },
+ { "lexpurge", 0, 0, GO_LEX_PURGE },
+ { "load-bmg", 1, 0, GO_LOAD_BMG },
+ { "loadbmg", 1, 0, GO_LOAD_BMG },
+ { "patch-bmg", 1, 0, GO_PATCH_BMG },
+ { "patchbmg", 1, 0, GO_PATCH_BMG },
+ { "pb", 1, 0, GO_PATCH_BMG },
+ { "macro-bmg", 1, 0, GO_MACRO_BMG },
+ { "macrobmg", 1, 0, GO_MACRO_BMG },
+ { "mb", 1, 0, GO_MACRO_BMG },
+ { "filter-bmg", 1, 0, GO_FILTER_BMG },
+ { "filterbmg", 1, 0, GO_FILTER_BMG },
+ { "fb", 1, 0, GO_FILTER_BMG },
+ { "msg", 1, 0, GO_FILTER_BMG },
+ { "cache", 1, 0, GO_CACHE },
+ { "cname", 1, 0, GO_CNAME },
+ { "id", 0, 0, GO_ID },
+ { "base64", 2, 0, GO_BASE64 },
+ { "db64", 2, 0, GO_DB64 },
+ { "coding", 1, 0, GO_CODING },
+ { "verify", 0, 0, GO_VERIFY },
+ { "round", 0, 0, GO_ROUND },
+ { "long", 0, 0, 'l' },
+ { "no-header", 0, 0, 'H' },
+ { "noheader", 0, 0, 'H' },
+ { "brief", 0, 0, 'B' },
+ { "pipe", 0, 0, GO_PIPE },
+ { "delta", 0, 0, GO_DELTA },
+ { "diff", 0, 0, GO_DIFF },
+ { "epsilon", 1, 0, GO_EPSILON },
+ { "bmg-encoding", 1, 0, GO_BMG_ENCODING },
+ { "bmgencoding", 1, 0, GO_BMG_ENCODING },
+ { "bmg-inf-size", 1, 0, GO_BMG_INF_SIZE },
+ { "bmginfsize", 1, 0, GO_BMG_INF_SIZE },
+ { "bmg-mid", 2, 0, GO_BMG_MID },
+ { "bmgmid", 2, 0, GO_BMG_MID },
+ { "force-attrib", 1, 0, GO_FORCE_ATTRIB },
+ { "forceattrib", 1, 0, GO_FORCE_ATTRIB },
+ { "def-attrib", 1, 0, GO_DEF_ATTRIB },
+ { "defattrib", 1, 0, GO_DEF_ATTRIB },
+ { "no-attrib", 0, 0, GO_NO_ATTRIB },
+ { "noattrib", 0, 0, GO_NO_ATTRIB },
+ { "x-escapes", 0, 0, GO_X_ESCAPES },
+ { "xescapes", 0, 0, GO_X_ESCAPES },
+ { "old-escapes", 0, 0, GO_OLD_ESCAPES },
+ { "oldescapes", 0, 0, GO_OLD_ESCAPES },
+ { "single-line", 0, 0, '1' },
+ { "singleline", 0, 0, '1' },
+ { "no-bmg-colors", 0, 0, GO_NO_BMG_COLORS },
+ { "nobmgcolors", 0, 0, GO_NO_BMG_COLORS },
+ { "bmg-colors", 0, 0, GO_BMG_COLORS },
+ { "bmgcolors", 0, 0, GO_BMG_COLORS },
+ { "no-bmg-inline", 0, 0, GO_NO_BMG_INLINE },
+ { "nobmginline", 0, 0, GO_NO_BMG_INLINE },
+ { "export", 0, 0, 'X' },
+ { "no-param", 0, 0, 'P' },
+ { "noparam", 0, 0, 'P' },
+ { "sort", 1, 0, 'S' },
+ { "max-file-size", 1, 0, 'M' },
+ { "maxfilesize", 1, 0, 'M' },
+ { "tracks", 1, 0, 'T' },
+ { "arenas", 1, 0, 'A' },
+ { "autoadd-path", 1, 0, GO_AUTOADD_PATH },
+ { "autoaddpath", 1, 0, GO_AUTOADD_PATH },
+ { "transform", 1, 0, 'x' },
+ { "strip", 0, 0, GO_STRIP },
+ { "utf-8", 0, 0, GO_UTF_8 },
+ { "utf8", 0, 0, GO_UTF_8 },
+ { "no-utf-8", 0, 0, GO_NO_UTF_8 },
+ { "no-utf8", 0, 0, GO_NO_UTF_8 },
+ { "noutf8", 0, 0, GO_NO_UTF_8 },
+ { "test", 0, 0, 't' },
+ { "force", 0, 0, GO_FORCE },
+ { "repair-magics", 2, 0, GO_REPAIR_MAGICS },
+ { "repairmagics", 2, 0, GO_REPAIR_MAGICS },
+ { "tiny", 1, 0, GO_TINY },
+ { "yaz0", 0, 0, GO_YAZ0 },
+ { "yaz1", 0, 0, GO_YAZ1 },
+ { "xyz", 0, 0, GO_XYZ },
+ { "bz", 0, 0, GO_BZ },
+ { "sh", 0, 0, GO_SH },
+ { "bash", 0, 0, GO_BASH },
+ { "json", 0, 0, GO_JSON },
+ { "php", 0, 0, GO_PHP },
+ { "makedoc", 0, 0, GO_MAKEDOC },
+ { "var", 1, 0, GO_VAR },
+ { "array", 0, 0, GO_ARRAY },
+ { "avar", 1, 0, GO_AVAR },
+ { "analyze", 1, 0, GO_ANALYZE },
+ { "analyse", 1, 0, GO_ANALYZE },
+ { "analyze-mode", 1, 0, GO_ANALYZE_MODE },
+ { "ana-mode", 1, 0, GO_ANALYZE_MODE },
+ { "anamode", 1, 0, GO_ANALYZE_MODE },
+ { "amd", 1, 0, GO_ANALYZE_MODE },
+ { "OLD", 0, 0, GO_OLD },
+ { "STD", 0, 0, GO_STD },
+ { "NEW", 0, 0, GO_NEW },
+ { "EXTRACT", 1, 0, GO_EXTRACT },
+ { "source", 1, 0, 's' },
+ { "src", 1, 0, 's' },
+ { "dest", 1, 0, 'd' },
+ { "DEST", 1, 0, 'D' },
+ { "esc", 1, 0, 'E' },
+ { "overwrite", 0, 0, 'o' },
+ { "number", 0, 0, GO_NUMBER },
+ { "num", 0, 0, GO_NUMBER },
+ { "remove-src", 0, 0, GO_REMOVE_SRC },
+ { "removesrc", 0, 0, GO_REMOVE_SRC },
+ { "rm-src", 0, 0, GO_REMOVE_SRC },
+ { "rmsrc", 0, 0, GO_REMOVE_SRC },
+ { "remove-dest", 0, 0, 'r' },
+ { "removedest", 0, 0, 'r' },
+ { "rm-dest", 0, 0, 'r' },
+ { "rmdest", 0, 0, 'r' },
+ { "remove", 0, 0, 'r' },
+ { "update", 0, 0, 'u' },
+ { "preserve", 0, 0, 'p' },
+ { "ignore", 0, 0, 'i' },
+ { "ignore-setup", 0, 0, GO_IGNORE_SETUP },
+ { "ignoresetup", 0, 0, GO_IGNORE_SETUP },
+ { "purge", 0, 0, GO_PURGE },
+ { "align-u8", 1, 0, GO_ALIGN_U8 },
+ { "alignu8", 1, 0, GO_ALIGN_U8 },
+ { "align-pack", 1, 0, GO_ALIGN_PACK },
+ { "alignpack", 1, 0, GO_ALIGN_PACK },
+ { "align-brres", 1, 0, GO_ALIGN_BRRES },
+ { "alignbrres", 1, 0, GO_ALIGN_BRRES },
+ { "align-breff", 1, 0, GO_ALIGN_BREFF },
+ { "alignbreff", 1, 0, GO_ALIGN_BREFF },
+ { "align-breft", 1, 0, GO_ALIGN_BREFT },
+ { "alignbreft", 1, 0, GO_ALIGN_BREFT },
+ { "align", 1, 0, GO_ALIGN },
+ { "encode-all", 0, 0, GO_ENCODE_ALL },
+ { "encodeall", 0, 0, GO_ENCODE_ALL },
+ { "eall", 0, 0, GO_ENCODE_ALL },
+ { "encode-img", 0, 0, GO_ENCODE_IMG },
+ { "encodeimg", 0, 0, GO_ENCODE_IMG },
+ { "eimg", 0, 0, GO_ENCODE_IMG },
+ { "no-encode", 0, 0, GO_NO_ENCODE },
+ { "noencode", 0, 0, GO_NO_ENCODE },
+ { "noenc", 0, 0, GO_NO_ENCODE },
+ { "no-recurse", 0, 0, GO_NO_RECURSE },
+ { "norecurse", 0, 0, GO_NO_RECURSE },
+ { "norec", 0, 0, GO_NO_RECURSE },
+ { "auto-add", 0, 0, GO_AUTO_ADD },
+ { "autoadd", 0, 0, GO_AUTO_ADD },
+ { "aadd", 0, 0, GO_AUTO_ADD },
+ { "no-echo", 0, 0, GO_NO_ECHO },
+ { "noecho", 0, 0, GO_NO_ECHO },
+ { "no-check", 0, 0, 'N' },
+ { "nocheck", 0, 0, 'N' },
+ { "pt-dir", 2, 0, GO_PT_DIR },
+ { "ptdir", 2, 0, GO_PT_DIR },
+ { "pdir", 2, 0, GO_PT_DIR },
+ { "rm-aiparam", 0, 0, GO_RM_AIPARAM },
+ { "rmaiparam", 0, 0, GO_RM_AIPARAM },
+ { "rmai", 0, 0, GO_RM_AIPARAM },
+ { "u8", 0, 0, GO_U8 },
+ { "szs", 0, 0, GO_SZS },
+ { "wu8", 0, 0, GO_WU8 },
+ { "xwu8", 0, 0, GO_XWU8 },
+ { "wbz", 0, 0, GO_WBZ },
+ { "pack", 0, 0, GO_PACK },
+ { "brres", 0, 0, GO_BRRES },
+ { "bres", 0, 0, GO_BRRES },
+ { "breff", 0, 0, GO_BREFF },
+ { "breft", 0, 0, GO_BREFT },
+ { "no-compress", 0, 0, GO_NO_COMPRESS },
+ { "nocompress", 0, 0, GO_NO_COMPRESS },
+ { "noc", 0, 0, GO_NO_COMPRESS },
+ { "compr", 1, 0, 'C' },
+ { "compress", 1, 0, 'C' },
+ { "fast", 0, 0, GO_FAST },
+ { "norm", 0, 0, 'n' },
+ { "links", 0, 0, GO_LINKS },
+ { "basedir", 1, 0, GO_BASEDIR },
+ { "bdir", 1, 0, GO_BASEDIR },
+ { "recurse", 2, 0, 'R' },
+ { "ext", 0, 0, 'e' },
+ { "decode", 0, 0, GO_DECODE },
+ { "dec", 0, 0, GO_DECODE },
+ { "mipmaps", 0, 0, GO_MIPMAPS },
+ { "mm", 0, 0, GO_MIPMAPS },
+ { "no-mipmaps", 0, 0, GO_NO_MIPMAPS },
+ { "nomipmaps", 0, 0, GO_NO_MIPMAPS },
+ { "no-mm", 0, 0, GO_NO_MIPMAPS },
+ { "nomm", 0, 0, GO_NO_MIPMAPS },
+ { "n-mipmaps", 1, 0, GO_N_MIPMAPS },
+ { "nmipmaps", 1, 0, GO_N_MIPMAPS },
+ { "n-mm", 1, 0, GO_N_MIPMAPS },
+ { "nmm", 1, 0, GO_N_MIPMAPS },
+ { "max-mipmaps", 1, 0, GO_MAX_MIPMAPS },
+ { "maxmipmaps", 1, 0, GO_MAX_MIPMAPS },
+ { "max-mm", 1, 0, GO_MAX_MIPMAPS },
+ { "maxmm", 1, 0, GO_MAX_MIPMAPS },
+ { "mipmap-size", 1, 0, GO_MIPMAP_SIZE },
+ { "mipmapsize", 1, 0, GO_MIPMAP_SIZE },
+ { "mm-size", 1, 0, GO_MIPMAP_SIZE },
+ { "mmsize", 1, 0, GO_MIPMAP_SIZE },
+ { "fast-mipmaps", 0, 0, GO_FAST_MIPMAPS },
+ { "fastmipmaps", 0, 0, GO_FAST_MIPMAPS },
+ { "fast-mm", 0, 0, GO_FAST_MIPMAPS },
+ { "fastmm", 0, 0, GO_FAST_MIPMAPS },
+ { "cmpr-default", 1, 0, GO_CMPR_DEFAULT },
+ { "cut", 0, 0, GO_CUT },
+ { "all", 0, 0, 'a' },
+ { "raw", 0, 0, GO_RAW },
+ { "sections", 0, 0, GO_SECTIONS },
+
+ {0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// OptionUsed & OptionIndex ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 OptionUsed[OPT__N_TOTAL+1] = {0};
+
+static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] =
+{
+ /* 0x000 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x010 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x020 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
+ /* 0x030 */ 0,
+ /* 0x031 1 */ OPT_SINGLE_LINE,
+ /* 0x032 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
+ /* 0x041 A */ OPT_ARENAS,
+ /* 0x042 B */ OPT_BRIEF,
+ /* 0x043 C */ OPT_COMPRESS,
+ /* 0x044 D */ OPT_DEST2,
+ /* 0x045 E */ OPT_ESC,
+ /* 0x046 */ 0,0,
+ /* 0x048 H */ OPT_NO_HEADER,
+ /* 0x049 */ 0,0,0,
+ /* 0x04c L */ OPT_LOGGING,
+ /* 0x04d M */ OPT_MAX_FILE_SIZE,
+ /* 0x04e N */ OPT_NO_CHECK,
+ /* 0x04f */ 0,
+ /* 0x050 P */ OPT_NO_PARAM,
+ /* 0x051 */ 0,
+ /* 0x052 R */ OPT_RECURSE,
+ /* 0x053 S */ OPT_SORT,
+ /* 0x054 T */ OPT_TRACKS,
+ /* 0x055 */ 0,
+ /* 0x056 V */ OPT_VERSION,
+ /* 0x057 */ 0,
+ /* 0x058 X */ OPT_EXPORT,
+ /* 0x059 */ 0,0,0,0, 0,0,0,0,
+ /* 0x061 a */ OPT_ALL,
+ /* 0x062 */ 0,
+ /* 0x063 c */ OPT_CONST,
+ /* 0x064 d */ OPT_DEST,
+ /* 0x065 e */ OPT_EXT,
+ /* 0x066 */ 0,0,
+ /* 0x068 h */ OPT_HELP,
+ /* 0x069 i */ OPT_IGNORE,
+ /* 0x06a */ 0,0,
+ /* 0x06c l */ OPT_LONG,
+ /* 0x06d */ 0,
+ /* 0x06e n */ OPT_NORM,
+ /* 0x06f o */ OPT_OVERWRITE,
+ /* 0x070 p */ OPT_PRESERVE,
+ /* 0x071 q */ OPT_QUIET,
+ /* 0x072 r */ OPT_REMOVE_DEST,
+ /* 0x073 s */ OPT_SOURCE,
+ /* 0x074 t */ OPT_TEST,
+ /* 0x075 u */ OPT_UPDATE,
+ /* 0x076 v */ OPT_VERBOSE,
+ /* 0x077 */ 0,
+ /* 0x078 x */ OPT_TRANSFORM,
+ /* 0x079 */ 0,0,0,0, 0,0,0,
+ /* 0x080 */ OPT_XHELP,
+ /* 0x081 */ OPT_ALLOW_ALL,
+ /* 0x082 */ OPT_COMPATIBLE,
+ /* 0x083 */ OPT_WIDTH,
+ /* 0x084 */ OPT_DE,
+ /* 0x085 */ OPT_COLORS,
+ /* 0x086 */ OPT_NO_COLORS,
+ /* 0x087 */ OPT_CT_CODE,
+ /* 0x088 */ OPT_LE_CODE,
+ /* 0x089 */ OPT_CHDIR,
+ /* 0x08a */ OPT_TOUCH,
+ /* 0x08b */ OPT_AUTO,
+ /* 0x08c */ OPT_SET_FLAGS,
+ /* 0x08d */ OPT_SET_SCALE,
+ /* 0x08e */ OPT_SET_ROT,
+ /* 0x08f */ OPT_SET_X,
+ /* 0x090 */ OPT_SET_Y,
+ /* 0x091 */ OPT_SET_Z,
+ /* 0x092 */ OPT_XCENTER,
+ /* 0x093 */ OPT_YCENTER,
+ /* 0x094 */ OPT_ZCENTER,
+ /* 0x095 */ OPT_CENTER,
+ /* 0x096 */ OPT_SCALE,
+ /* 0x097 */ OPT_SHIFT,
+ /* 0x098 */ OPT_XSS,
+ /* 0x099 */ OPT_YSS,
+ /* 0x09a */ OPT_ZSS,
+ /* 0x09b */ OPT_ROT,
+ /* 0x09c */ OPT_XROT,
+ /* 0x09d */ OPT_YROT,
+ /* 0x09e */ OPT_ZROT,
+ /* 0x09f */ OPT_YPOS,
+ /* 0x0a0 */ OPT_TRANSLATE,
+ /* 0x0a1 */ OPT_NULL,
+ /* 0x0a2 */ OPT_NEXT,
+ /* 0x0a3 */ OPT_ASCALE,
+ /* 0x0a4 */ OPT_AROT,
+ /* 0x0a5 */ OPT_TFORM_SCRIPT,
+ /* 0x0a6 */ OPT_MINIMAP,
+ /* 0x0a7 */ OPT_RM_GOBJ,
+ /* 0x0a8 */ OPT_BATTLE,
+ /* 0x0a9 */ OPT_EXPORT_FLAGS,
+ /* 0x0aa */ OPT_ROUTE_OPTIONS,
+ /* 0x0ab */ OPT_WIM0,
+ /* 0x0ac */ OPT_SLOT,
+ /* 0x0ad */ OPT_LOAD_KCL,
+ /* 0x0ae */ OPT_KCL,
+ /* 0x0af */ OPT_KCL_FLAG,
+ /* 0x0b0 */ OPT_KCL_SCRIPT,
+ /* 0x0b1 */ OPT_TRI_AREA,
+ /* 0x0b2 */ OPT_TRI_HEIGHT,
+ /* 0x0b3 */ OPT_FLAG_FILE,
+ /* 0x0b4 */ OPT_XTRIDATA,
+ /* 0x0b5 */ OPT_KMP,
+ /* 0x0b6 */ OPT_SPEED_MOD,
+ /* 0x0b7 */ OPT_KTPT2,
+ /* 0x0b8 */ OPT_TFORM_KMP,
+ /* 0x0b9 */ OPT_REPAIR_XPF,
+ /* 0x0ba */ OPT_GAMEMODES,
+ /* 0x0bb */ OPT_MDL,
+ /* 0x0bc */ OPT_PAT,
+ /* 0x0bd */ OPT_PATCH_FILE,
+ /* 0x0be */ OPT_KMG_LIMIT,
+ /* 0x0bf */ OPT_KMG_COPY,
+ /* 0x0c0 */ OPT_LT_CLEAR,
+ /* 0x0c1 */ OPT_LT_ONLINE,
+ /* 0x0c2 */ OPT_LT_N_PLAYERS,
+ /* 0x0c3 */ OPT_LT_COND_BIT,
+ /* 0x0c4 */ OPT_LT_GAME_MODE,
+ /* 0x0c5 */ OPT_LT_ENGINE,
+ /* 0x0c6 */ OPT_LT_RANDOM,
+ /* 0x0c7 */ OPT_LEX_PURGE,
+ /* 0x0c8 */ OPT_LOAD_BMG,
+ /* 0x0c9 */ OPT_PATCH_BMG,
+ /* 0x0ca */ OPT_MACRO_BMG,
+ /* 0x0cb */ OPT_FILTER_BMG,
+ /* 0x0cc */ OPT_CACHE,
+ /* 0x0cd */ OPT_CNAME,
+ /* 0x0ce */ OPT_ID,
+ /* 0x0cf */ OPT_BASE64,
+ /* 0x0d0 */ OPT_DB64,
+ /* 0x0d1 */ OPT_CODING,
+ /* 0x0d2 */ OPT_VERIFY,
+ /* 0x0d3 */ OPT_ROUND,
+ /* 0x0d4 */ OPT_PIPE,
+ /* 0x0d5 */ OPT_DELTA,
+ /* 0x0d6 */ OPT_DIFF,
+ /* 0x0d7 */ OPT_EPSILON,
+ /* 0x0d8 */ OPT_BMG_ENCODING,
+ /* 0x0d9 */ OPT_BMG_INF_SIZE,
+ /* 0x0da */ OPT_BMG_MID,
+ /* 0x0db */ OPT_FORCE_ATTRIB,
+ /* 0x0dc */ OPT_DEF_ATTRIB,
+ /* 0x0dd */ OPT_NO_ATTRIB,
+ /* 0x0de */ OPT_X_ESCAPES,
+ /* 0x0df */ OPT_OLD_ESCAPES,
+ /* 0x0e0 */ OPT_NO_BMG_COLORS,
+ /* 0x0e1 */ OPT_BMG_COLORS,
+ /* 0x0e2 */ OPT_NO_BMG_INLINE,
+ /* 0x0e3 */ OPT_AUTOADD_PATH,
+ /* 0x0e4 */ OPT_STRIP,
+ /* 0x0e5 */ OPT_UTF_8,
+ /* 0x0e6 */ OPT_NO_UTF_8,
+ /* 0x0e7 */ OPT_FORCE,
+ /* 0x0e8 */ OPT_REPAIR_MAGICS,
+ /* 0x0e9 */ OPT_TINY,
+ /* 0x0ea */ OPT_YAZ0,
+ /* 0x0eb */ OPT_YAZ1,
+ /* 0x0ec */ OPT_XYZ,
+ /* 0x0ed */ OPT_BZ,
+ /* 0x0ee */ OPT_SH,
+ /* 0x0ef */ OPT_BASH,
+ /* 0x0f0 */ OPT_JSON,
+ /* 0x0f1 */ OPT_PHP,
+ /* 0x0f2 */ OPT_MAKEDOC,
+ /* 0x0f3 */ OPT_VAR,
+ /* 0x0f4 */ OPT_ARRAY,
+ /* 0x0f5 */ OPT_AVAR,
+ /* 0x0f6 */ OPT_ANALYZE,
+ /* 0x0f7 */ OPT_ANALYZE_MODE,
+ /* 0x0f8 */ OPT_OLD,
+ /* 0x0f9 */ OPT_STD,
+ /* 0x0fa */ OPT_NEW,
+ /* 0x0fb */ OPT_EXTRACT,
+ /* 0x0fc */ OPT_NUMBER,
+ /* 0x0fd */ OPT_REMOVE_SRC,
+ /* 0x0fe */ OPT_IGNORE_SETUP,
+ /* 0x0ff */ OPT_PURGE,
+ /* 0x100 */ OPT_ALIGN_U8,
+ /* 0x101 */ OPT_ALIGN_PACK,
+ /* 0x102 */ OPT_ALIGN_BRRES,
+ /* 0x103 */ OPT_ALIGN_BREFF,
+ /* 0x104 */ OPT_ALIGN_BREFT,
+ /* 0x105 */ OPT_ALIGN,
+ /* 0x106 */ OPT_ENCODE_ALL,
+ /* 0x107 */ OPT_ENCODE_IMG,
+ /* 0x108 */ OPT_NO_ENCODE,
+ /* 0x109 */ OPT_NO_RECURSE,
+ /* 0x10a */ OPT_AUTO_ADD,
+ /* 0x10b */ OPT_NO_ECHO,
+ /* 0x10c */ OPT_PT_DIR,
+ /* 0x10d */ OPT_RM_AIPARAM,
+ /* 0x10e */ OPT_U8,
+ /* 0x10f */ OPT_SZS,
+ /* 0x110 */ OPT_WU8,
+ /* 0x111 */ OPT_XWU8,
+ /* 0x112 */ OPT_WBZ,
+ /* 0x113 */ OPT_PACK,
+ /* 0x114 */ OPT_BRRES,
+ /* 0x115 */ OPT_BREFF,
+ /* 0x116 */ OPT_BREFT,
+ /* 0x117 */ OPT_NO_COMPRESS,
+ /* 0x118 */ OPT_FAST,
+ /* 0x119 */ OPT_LINKS,
+ /* 0x11a */ OPT_BASEDIR,
+ /* 0x11b */ OPT_DECODE,
+ /* 0x11c */ OPT_MIPMAPS,
+ /* 0x11d */ OPT_NO_MIPMAPS,
+ /* 0x11e */ OPT_N_MIPMAPS,
+ /* 0x11f */ OPT_MAX_MIPMAPS,
+ /* 0x120 */ OPT_MIPMAP_SIZE,
+ /* 0x121 */ OPT_FAST_MIPMAPS,
+ /* 0x122 */ OPT_CMPR_DEFAULT,
+ /* 0x123 */ OPT_CUT,
+ /* 0x124 */ OPT_RAW,
+ /* 0x125 */ OPT_SECTIONS,
+ /* 0x126 */ 0,0,0,0, 0,0,
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// opt_allowed_cmd_* ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static u8 option_allowed_cmd_VERSION[130] = // cmd #1
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1
+};
+
+static u8 option_allowed_cmd_HELP[130] = // cmd #2
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1
+};
+
+static u8 option_allowed_cmd_ARGTEST[130] = // cmd #3
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1
+};
+
+static u8 option_allowed_cmd_TEST[130] = // cmd #4
+{
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1
+};
+
+static u8 option_allowed_cmd_COLORS[130] = // cmd #5
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_ERROR[130] = // cmd #6
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1
+};
+
+static u8 option_allowed_cmd_FILETYPE[130] = // cmd #7
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_FILEATTRIB[130] = // cmd #8
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_BRSUB[130] = // cmd #9
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_SYMBOLS[130] = // cmd #10
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_FUNCTIONS[130] = // cmd #11
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_CALCULATE[130] = // cmd #12
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_MATRIX[130] = // cmd #13
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_FLOAT[130] = // cmd #14
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_VR_CALC[130] = // cmd #15
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_VR_RACE[130] = // cmd #16
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_AUTOADD[130] = // cmd #17
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,0,1,0,0, 1,0,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_TRACKS[130] = // cmd #18
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,1,0,0, 1,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,1,0,0
+};
+
+static u8 option_allowed_cmd_SCANCACHE[130] = // cmd #19
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_EXPORT[130] = // cmd #20
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_CODE[130] = // cmd #21
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_RECODE[130] = // cmd #22
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_SUBFILE[130] = // cmd #23
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,0, 1,1,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_LIST[130] = // cmd #24
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,0,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_LIST_L[130] = // cmd #25
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,0,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_LIST_LL[130] = // cmd #26
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,0,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_LIST_LLL[130] = // cmd #27
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,0,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_LIST_A[130] = // cmd #28
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,0,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_LIST_LA[130] = // cmd #29
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,0,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_NAME_REF[130] = // cmd #30
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_ILIST[130] = // cmd #31
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_ILIST_L[130] = // cmd #32
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_ILIST_LL[130] = // cmd #33
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_ILIST_A[130] = // cmd #34
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_ILIST_LA[130] = // cmd #35
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_MEMORY[130] = // cmd #36
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_MEMORY_A[130] = // cmd #37
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,0,0
+};
+
+static u8 option_allowed_cmd_DUMP[130] = // cmd #38
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_SHA1[130] = // cmd #39
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,1,1,1,1, 1,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_ANALYZE[130] = // cmd #40
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_DISTRIBUTION[130] = // cmd #41
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,1,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,1,1, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_DIFF[130] = // cmd #42
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,1,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0
+};
+
+static u8 option_allowed_cmd_CHECK[130] = // cmd #43
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,1,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,1, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_SLOTS[130] = // cmd #44
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,1, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_STGI[130] = // cmd #45
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_ISARENA[130] = // cmd #46
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_NORMALIZE[130] = // cmd #47
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,1,1,1,1, 1,0,0,0,0, 0,0,1,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_PATCH[130] = // cmd #48
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_COPY[130] = // cmd #49
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_DUPLICATE[130] = // cmd #50
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,1,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_MINIMAP[130] = // cmd #51
+{
+ 0,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,1,1,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_COMPRESS[130] = // cmd #52
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,1,1,1,1, 1,0,0,0,0, 0,1,1,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_DECOMPRESS[130] = // cmd #53
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 1,1,1,1,0, 0,1,1,1,1,
+ 1,1,0,0,0, 0,1,0,0,1, 1,1,0,1,0, 0,0,0,0,0, 0,0,0,1,1, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_ENCODE[130] = // cmd #54
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_CREATE[130] = // cmd #55
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,1, 1,1,1,1,0, 1,1,1,0,1, 0,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,0,1, 0,0,0,0,1,
+ 1,1,1,1,1, 1,0,1,0,0
+};
+
+static u8 option_allowed_cmd_UPDATE[130] = // cmd #56
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,1, 1,0,0,1,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,1,1,1, 1,0,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 1,1,1,0,0, 0,1,0,0,0,
+ 0,0,0,0,0, 0,0,1,0,0
+};
+
+static u8 option_allowed_cmd_EXTRACT[130] = // cmd #57
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0, 0,1,1,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1,
+ 1,0,0,0,1, 1,1,1,1,0
+};
+
+static u8 option_allowed_cmd_XDECODE[130] = // cmd #58
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0, 0,1,1,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1,
+ 1,0,0,0,1, 1,1,1,1,0
+};
+
+static u8 option_allowed_cmd_XEXPORT[130] = // cmd #59
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0, 0,1,1,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1,
+ 1,0,0,0,1, 1,1,1,1,0
+};
+
+static u8 option_allowed_cmd_XALL[130] = // cmd #60
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,1,1, 0,1,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0, 0,1,1,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1,
+ 1,0,0,0,1, 1,1,1,1,0
+};
+
+static u8 option_allowed_cmd_XCOMMON[130] = // cmd #61
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_BINARY[130] = // cmd #62
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_TEXT[130] = // cmd #63
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,1,1,0,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,0,0, 0,0,0,0,1, 1,1,1,1,0, 1,1,1,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_CAT[130] = // cmd #64
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,1,1,0,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_BMG[130] = // cmd #65
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 0,0,0,0,1, 1,1,1,1,1,
+ 1,1,1,1,1, 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_KCL[130] = // cmd #66
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_KMP[130] = // cmd #67
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1,
+ 1,1,1,1,0, 1,0,0,1,1, 1,0,0,0,0, 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_LEX[130] = // cmd #68
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_INFO[130] = // cmd #69
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_GHOST[130] = // cmd #70
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_YAZDUMP[130] = // cmd #71
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,0, 1,1,1,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+static u8 option_allowed_cmd_VEHICLE[130] = // cmd #72
+{
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,1, 1,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
+ 0,0,0,0,0, 0,0,0,0,0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoOption tabs ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoOption_t * option_tab_tool[] =
+{
+ OptionInfo + OPT_VERSION,
+ OptionInfo + OPT_HELP,
+ OptionInfo + OPT_XHELP,
+ OptionInfo + OPT_ALLOW_ALL,
+ OptionInfo + OPT_COMPATIBLE,
+ OptionInfo + OPT_WIDTH,
+ OptionInfo + OPT_QUIET,
+ OptionInfo + OPT_VERBOSE,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_DE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_CT_CODE,
+ OptionInfo + OPT_LE_CODE,
+ OptionInfo + OPT_CHDIR,
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_BATTLE,
+ OptionInfo + OPT_EXPORT_FLAGS,
+ OptionInfo + OPT_ROUTE_OPTIONS,
+ OptionInfo + OPT_WIM0,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_KMG_LIMIT,
+ OptionInfo + OPT_KMG_COPY,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_CACHE,
+ OptionInfo + OPT_CNAME,
+ OptionInfo + OPT_MAX_FILE_SIZE,
+ OptionInfo + OPT_TRACKS,
+ OptionInfo + OPT_ARENAS,
+ OptionInfo + OPT_AUTOADD_PATH,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TEST,
+ OptionInfo + OPT_FORCE,
+ OptionInfo + OPT_REPAIR_MAGICS,
+ OptionInfo + OPT_TINY,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_XYZ,
+ OptionInfo + OPT_BZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SH,
+ OptionInfo + OPT_BASH,
+ OptionInfo + OPT_JSON,
+ OptionInfo + OPT_PHP,
+ OptionInfo + OPT_MAKEDOC,
+ OptionInfo + OPT_VAR,
+ OptionInfo + OPT_ARRAY,
+ OptionInfo + OPT_AVAR,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VERSION[] =
+{
+ &option_cmd_VERSION_BRIEF,
+ OptionInfo + OPT_SECTIONS,
+ &option_cmd_VERSION_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_HELP[] =
+{
+ OptionInfo + OPT_WIDTH,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ARGTEST[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEST[] =
+{
+ &option_cmd_TEST_VERBOSE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COLORS[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_COLORS_LONG,
+ &option_cmd_COLORS_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ERROR[] =
+{
+ OptionInfo + OPT_SECTIONS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ERROR_LONG,
+ &option_cmd_ERROR_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILETYPE[] =
+{
+ &option_cmd_FILETYPE_LONG,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FILEATTRIB[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_BRSUB[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_BRSUB_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SYMBOLS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FUNCTIONS[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_FUNCTIONS_BRIEF,
+ &option_cmd_FUNCTIONS_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CALCULATE[] =
+{
+ OptionInfo + OPT_CONST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MATRIX[] =
+{
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ &option_cmd_MATRIX_BRIEF,
+ &option_cmd_MATRIX_LONG,
+ &option_cmd_MATRIX_QUIET,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_FLOAT[] =
+{
+ OptionInfo + OPT_ROUND,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VR_CALC[] =
+{
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_VR_CALC_BRIEF,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VR_RACE[] =
+{
+ &option_cmd_VR_RACE_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_AUTOADD[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_AUTOADD_QUIET,
+ &option_cmd_AUTOADD_VERBOSE,
+ &option_cmd_AUTOADD_DEST,
+ OptionInfo + OPT_DEST2,
+ &option_cmd_AUTOADD_OVERWRITE,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_PRESERVE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TRACKS[] =
+{
+ &option_cmd_TRACKS_VERBOSE,
+ &option_cmd_TRACKS_ALL,
+ &option_cmd_TRACKS_LONG,
+ OptionInfo + OPT_PIPE,
+ OptionInfo + OPT_LOAD_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SCANCACHE[] =
+{
+ OptionInfo + OPT_CACHE,
+ OptionInfo + OPT_PURGE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXPORT[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CODE[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_RECODE[] =
+{
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SUBFILE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_L[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_LL[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_LLL[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_A[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LIST_LA[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ &option_cmd_LIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_NAME_REF[] =
+{
+ &option_cmd_NAME_REF_SORT,
+ &option_cmd_NAME_REF_BRIEF,
+ &option_cmd_NAME_REF_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ILIST[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_ALL,
+ &option_cmd_ILIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ILIST_L[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_ALL,
+ &option_cmd_ILIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ILIST_LL[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_ALL,
+ &option_cmd_ILIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ILIST_A[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_ALL,
+ &option_cmd_ILIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ILIST_LA[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_ALL,
+ &option_cmd_ILIST_LONG,
+ OptionInfo + OPT_SORT,
+ OptionInfo + OPT_NO_HEADER,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MEMORY[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ &option_cmd_MEMORY_DECODE,
+ &option_cmd_MEMORY_MIPMAPS,
+ OptionInfo + OPT_CUT,
+ &option_cmd_MEMORY_ALL,
+ &option_cmd_MEMORY_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MEMORY_A[] =
+{
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ &option_cmd_MEMORY_DECODE,
+ &option_cmd_MEMORY_MIPMAPS,
+ OptionInfo + OPT_CUT,
+ &option_cmd_MEMORY_ALL,
+ &option_cmd_MEMORY_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_SLOT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DUMP[] =
+{
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SHA1[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_ID,
+ OptionInfo + OPT_BASE64,
+ OptionInfo + OPT_DB64,
+ OptionInfo + OPT_CODING,
+ OptionInfo + OPT_VERIFY,
+ &option_cmd_SHA1_BRIEF,
+ &option_cmd_SHA1_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ANALYZE[] =
+{
+ &option_cmd_ANALYZE_LONG,
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_ANALYZE_QUIET,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SH,
+ OptionInfo + OPT_BASH,
+ OptionInfo + OPT_JSON,
+ OptionInfo + OPT_PHP,
+ OptionInfo + OPT_MAKEDOC,
+ OptionInfo + OPT_VAR,
+ OptionInfo + OPT_ARRAY,
+ OptionInfo + OPT_AVAR,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DISTRIBUTION[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_BASE64,
+ OptionInfo + OPT_DB64,
+ OptionInfo + OPT_CODING,
+ &option_cmd_DISTRIBUTION_SOURCE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DIFF[] =
+{
+ &option_cmd_DIFF_QUIET,
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_ESC,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CHECK[] =
+{
+ &option_cmd_CHECK_NO_CHECK,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ &option_cmd_CHECK_BRIEF,
+ &option_cmd_CHECK_LONG,
+ &option_cmd_CHECK_QUIET,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_SLOTS[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_SLOTS_BRIEF,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_STGI[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_STGI_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ISARENA[] =
+{
+ OptionInfo + OPT_COLORS,
+ OptionInfo + OPT_NO_COLORS,
+ OptionInfo + OPT_NO_HEADER,
+ &option_cmd_ISARENA_BRIEF,
+ &option_cmd_ISARENA_QUIET,
+ &option_cmd_ISARENA_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_NORMALIZE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_REMOVE_SRC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_PATCH[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_REMOVE_SRC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COPY[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_REMOVE_SRC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DUPLICATE[] =
+{
+ OptionInfo + OPT_GAMEMODES,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_REMOVE_SRC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_MINIMAP[] =
+{
+ &option_cmd_MINIMAP_LONG,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_TOUCH,
+ OptionInfo + OPT_AUTO,
+ OptionInfo + OPT_SET_FLAGS,
+ OptionInfo + OPT_SET_SCALE,
+ OptionInfo + OPT_SET_ROT,
+ OptionInfo + OPT_SET_X,
+ OptionInfo + OPT_SET_Y,
+ OptionInfo + OPT_SET_Z,
+ OptionInfo + OPT_XCENTER,
+ OptionInfo + OPT_YCENTER,
+ OptionInfo + OPT_ZCENTER,
+ OptionInfo + OPT_CENTER,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_COMPRESS[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_REMOVE_SRC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_DECOMPRESS[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_REMOVE_SRC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_NORM,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_AUTO_ADD,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_ENCODE[] =
+{
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CREATE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_IGNORE_SETUP,
+ OptionInfo + OPT_U8,
+ OptionInfo + OPT_WU8,
+ OptionInfo + OPT_PACK,
+ OptionInfo + OPT_BRRES,
+ OptionInfo + OPT_BREFF,
+ OptionInfo + OPT_BREFT,
+ OptionInfo + OPT_YAZ0,
+ OptionInfo + OPT_YAZ1,
+ OptionInfo + OPT_BZ,
+ OptionInfo + OPT_SZS,
+ OptionInfo + OPT_WBZ,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PT_DIR,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_RM_AIPARAM,
+ OptionInfo + OPT_ALIGN_U8,
+ OptionInfo + OPT_ALIGN_PACK,
+ OptionInfo + OPT_ALIGN_BRRES,
+ OptionInfo + OPT_ALIGN_BREFF,
+ OptionInfo + OPT_ALIGN_BREFT,
+ OptionInfo + OPT_ALIGN,
+ OptionInfo + OPT_LOGGING,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ &option_grp_ENCODE_ALL,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_AUTO_ADD,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_N_MIPMAPS,
+ OptionInfo + OPT_MAX_MIPMAPS,
+ OptionInfo + OPT_MIPMAP_SIZE,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_NO_COMPRESS,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_FAST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_UPDATE[] =
+{
+ OptionInfo + OPT_SOURCE,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_NO_COMPRESS,
+ OptionInfo + OPT_COMPRESS,
+ OptionInfo + OPT_FAST,
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_ALL,
+ OptionInfo + OPT_ENCODE_ALL,
+ OptionInfo + OPT_ENCODE_IMG,
+ OptionInfo + OPT_NO_ENCODE,
+ OptionInfo + OPT_NO_RECURSE,
+ OptionInfo + OPT_NO_ECHO,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_TRANSFORM,
+ OptionInfo + OPT_STRIP,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_EXTRACT[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_BASEDIR,
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_DECODE,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_DELTA,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_RAW,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_XDECODE[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_BASEDIR,
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_DECODE,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_DELTA,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_RAW,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_XEXPORT[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_BASEDIR,
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_DECODE,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_DELTA,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_RAW,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_XALL[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_BASEDIR,
+ OptionInfo + OPT_RECURSE,
+ OptionInfo + OPT_EXT,
+ OptionInfo + OPT_LINKS,
+ OptionInfo + OPT_DECODE,
+ OptionInfo + OPT_MIPMAPS,
+ OptionInfo + OPT_NO_MIPMAPS,
+ OptionInfo + OPT_FAST_MIPMAPS,
+ OptionInfo + OPT_CMPR_DEFAULT,
+ OptionInfo + OPT_CUT,
+ OptionInfo + OPT_ALL,
+ OptionInfo + OPT_IGNORE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_DELTA,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_NO_CHECK,
+ OptionInfo + OPT_RAW,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_XCOMMON[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+ OptionInfo + OPT_IGNORE,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_BINARY[] =
+{
+ OptionInfo + OPT_KMG_LIMIT,
+ OptionInfo + OPT_KMG_COPY,
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_TEXT[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_DECODE,
+ OptionInfo + OPT_KMG_LIMIT,
+ OptionInfo + OPT_KMG_COPY,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_DELTA,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ &option_grp_BMG_LONG,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_CAT[] =
+{
+ OptionInfo + OPT_IGNORE,
+ OptionInfo + OPT_DECODE,
+ &option_grp_TEXTOUT_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_DELTA,
+ OptionInfo + OPT_DIFF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ &option_grp_BMG_LONG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_BMG[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_BMG_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_BMG_ENCODING,
+ OptionInfo + OPT_BMG_INF_SIZE,
+ OptionInfo + OPT_BMG_MID,
+ OptionInfo + OPT_FORCE_ATTRIB,
+ OptionInfo + OPT_DEF_ATTRIB,
+ OptionInfo + OPT_NO_ATTRIB,
+ OptionInfo + OPT_X_ESCAPES,
+ OptionInfo + OPT_OLD_ESCAPES,
+ OptionInfo + OPT_SINGLE_LINE,
+ OptionInfo + OPT_NO_BMG_COLORS,
+ OptionInfo + OPT_BMG_COLORS,
+ OptionInfo + OPT_NO_BMG_INLINE,
+ &option_grp_BMG_LONG,
+ OptionInfo + OPT_EXPORT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_KCL[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_KCL_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_KMP[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_KMP_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+ OptionInfo + OPT_NO_PARAM,
+ OptionInfo + OPT_NO_CHECK,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_CONST,
+ OptionInfo + OPT_SCALE,
+ OptionInfo + OPT_SHIFT,
+ OptionInfo + OPT_XSS,
+ OptionInfo + OPT_YSS,
+ OptionInfo + OPT_ZSS,
+ OptionInfo + OPT_ROT,
+ OptionInfo + OPT_XROT,
+ OptionInfo + OPT_YROT,
+ OptionInfo + OPT_ZROT,
+ OptionInfo + OPT_YPOS,
+ OptionInfo + OPT_TRANSLATE,
+ OptionInfo + OPT_NULL,
+ OptionInfo + OPT_NEXT,
+ OptionInfo + OPT_ASCALE,
+ OptionInfo + OPT_AROT,
+ OptionInfo + OPT_TFORM_SCRIPT,
+ OptionInfo + OPT_RM_GOBJ,
+ OptionInfo + OPT_SLOT,
+ OptionInfo + OPT_LOAD_KCL,
+ OptionInfo + OPT_KCL,
+ OptionInfo + OPT_KCL_FLAG,
+ OptionInfo + OPT_KCL_SCRIPT,
+ OptionInfo + OPT_TRI_AREA,
+ OptionInfo + OPT_TRI_HEIGHT,
+ OptionInfo + OPT_KMP,
+ OptionInfo + OPT_SPEED_MOD,
+ OptionInfo + OPT_KTPT2,
+ OptionInfo + OPT_TFORM_KMP,
+ OptionInfo + OPT_REPAIR_XPF,
+ OptionInfo + OPT_MDL,
+ OptionInfo + OPT_MINIMAP,
+ OptionInfo + OPT_PAT,
+ OptionInfo + OPT_PATCH_FILE,
+ OptionInfo + OPT_LT_CLEAR,
+ OptionInfo + OPT_LT_ONLINE,
+ OptionInfo + OPT_LT_N_PLAYERS,
+ OptionInfo + OPT_LT_COND_BIT,
+ OptionInfo + OPT_LT_GAME_MODE,
+ OptionInfo + OPT_LT_ENGINE,
+ OptionInfo + OPT_LT_RANDOM,
+ OptionInfo + OPT_LEX_PURGE,
+ OptionInfo + OPT_PATCH_BMG,
+ OptionInfo + OPT_MACRO_BMG,
+ OptionInfo + OPT_FILTER_BMG,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_LEX[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_LEX_NO_HEADER,
+ OptionInfo + OPT_BRIEF,
+ OptionInfo + OPT_EXPORT,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_INFO[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_INFO_NO_HEADER,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_GHOST[] =
+{
+ OptionInfo + OPT_IGNORE,
+ &option_cmd_GHOST_NO_HEADER,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_SH,
+ OptionInfo + OPT_BASH,
+ OptionInfo + OPT_JSON,
+ OptionInfo + OPT_PHP,
+ OptionInfo + OPT_MAKEDOC,
+ OptionInfo + OPT_VAR,
+ OptionInfo + OPT_ARRAY,
+ OptionInfo + OPT_AVAR,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_YAZDUMP[] =
+{
+ OptionInfo + OPT_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_ESC,
+
+ OptionInfo + OPT_NONE, // separator
+
+ OptionInfo + OPT_PRESERVE,
+ OptionInfo + OPT_UPDATE,
+ OptionInfo + OPT_OVERWRITE,
+ OptionInfo + OPT_NUMBER,
+ OptionInfo + OPT_REMOVE_DEST,
+
+ 0
+};
+
+static const InfoOption_t * option_tab_cmd_VEHICLE[] =
+{
+ &option_cmd_VEHICLE_SOURCE,
+ &option_cmd_VEHICLE_DEST,
+ OptionInfo + OPT_DEST2,
+ OptionInfo + OPT_OVERWRITE,
+ &option_cmd_VEHICLE_QUIET,
+ &option_cmd_VEHICLE_VERBOSE,
+ &option_cmd_VEHICLE_BRIEF,
+
+ 0
+};
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoCommand ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+static const InfoCommand_t CommandInfo[CMD__N+1] =
+{
+ { 0,
+ false,
+ false,
+ false,
+ "wszst",
+ 0,
+ "wszst [option]... command [option|parameter|file]...",
+ "Wiimms SZS Tool : List, compare, (de-)compress, extract and create"
+ " SZS, U8, PACK, BRRES, BREFF, BREFT and RARC archives. It is also a"
+ " wrapper to all other tools.",
+ 0,
+ 63,
+ option_tab_tool,
+ 0
+ },
+
+ { CMD_VERSION,
+ false,
+ false,
+ false,
+ "VERSION",
+ 0,
+ "wszst VERSION [ignored]...",
+ "Print program name and version and exit.",
+ 0,
+ 3,
+ option_tab_cmd_VERSION,
+ option_allowed_cmd_VERSION
+ },
+
+ { CMD_HELP,
+ false,
+ false,
+ false,
+ "HELP",
+ "H",
+ "wszst HELP [--width=wd] OPT|OPTION [option]...\n"
+ "wszst HELP [--width=wd] CMD|COMMAND ...\n"
+ "wszst HELP [--width=wd] command ...\n"
+ "wszst HELP [--width=wd] ...",
+ "Print help for commands and options.",
+ "Print help for commands and options.\n"
+ " The first variant (with keyword OPT or OPTION) prints a list of all"
+ " global and command specific options. If at least one option is set,"
+ " only info about the declared options are printed. The second variant"
+ " (with keyword CMD or COMMAND) prints an overview about all commands."
+ " The third variant (with a valid command name) prints details about"
+ " the declared command. The fourth variant prints an overview about"
+ " all commands and all global options.",
+ 1,
+ option_tab_cmd_HELP,
+ option_allowed_cmd_HELP
+ },
+
+ { CMD_ARGTEST,
+ false,
+ false,
+ false,
+ "ARGTEST",
+ 0,
+ "wszst ARGTEST ...",
+ "This debug command accepts all kinds of parameters and prints one"
+ " line for each parameter.",
+ 0,
+ 0,
+ option_tab_cmd_ARGTEST,
+ option_allowed_cmd_ARGTEST
+ },
+
+ { CMD_TEST,
+ false,
+ false,
+ false,
+ "TEST",
+ 0,
+ "wszst TEST [options]... [ignored]...",
+ "This debugging command accepts all options and parameters and prints"
+ " a list of the internal option values. The command is designed to"
+ " test the option parameters. The non option parameters are completely"
+ " ignored.",
+ 0,
+ 1,
+ option_tab_cmd_TEST,
+ option_allowed_cmd_TEST
+ },
+
+ { CMD_COLORS,
+ false,
+ false,
+ false,
+ "COLORS",
+ 0,
+ "wszst COLORS",
+ "Ignore all parameters and print colored text for testing.",
+ 0,
+ 4,
+ option_tab_cmd_COLORS,
+ option_allowed_cmd_COLORS
+ },
+
+ { CMD_ERROR,
+ false,
+ false,
+ false,
+ "ERROR",
+ "ERR",
+ "wszst ERROR [error_code]",
+ "Translate an exit code to a message name. If no exit code is entered,"
+ " print a table with all error messages.",
+ 0,
+ 4,
+ option_tab_cmd_ERROR,
+ option_allowed_cmd_ERROR
+ },
+
+ { CMD_FILETYPE,
+ false,
+ false,
+ false,
+ "FILETYPE",
+ "FT",
+ "wszst FILETYPE file...",
+ "Scan the header of the entered files and print file type and path for"
+ " each file as list.",
+ 0,
+ 3,
+ option_tab_cmd_FILETYPE,
+ option_allowed_cmd_FILETYPE
+ },
+
+ { CMD_FILEATTRIB,
+ false,
+ false,
+ false,
+ "FILEATTRIB",
+ "FA",
+ "wszst FILEATTRIB [keyword]...",
+ "Print a table with attributes for all known file types. If at least"
+ " one keyword is entered, only matching file types are printed. A"
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the"
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT').",
+ 0,
+ 1,
+ option_tab_cmd_FILEATTRIB,
+ option_allowed_cmd_FILEATTRIB
+ },
+
+ { CMD_BRSUB,
+ false,
+ false,
+ false,
+ "BRSUB",
+ 0,
+ "wszst BRSUB [file]...",
+ " If no file is defined, print a table with known BRRES sub files"
+ " consisting of file format, version, number of sections and warn"
+ " level. Otherwise analyse the version numbers of each BRRES sub file"
+ " of each source and print warnings about invalid versions.",
+ 0,
+ 3,
+ option_tab_cmd_BRSUB,
+ option_allowed_cmd_BRSUB
+ },
+
+ { CMD_SYMBOLS,
+ false,
+ false,
+ false,
+ "SYMBOLS",
+ 0,
+ "wszst SYMBOLS",
+ "Print predefined symbols of text parser to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_SYMBOLS,
+ option_allowed_cmd_SYMBOLS
+ },
+
+ { CMD_FUNCTIONS,
+ false,
+ false,
+ false,
+ "FUNCTIONS",
+ 0,
+ "wszst FUNCTIONS [key]...",
+ "Print a list with all parser functions. If one or more keys entered,"
+ " then only functions that match at least one key are printed.",
+ 0,
+ 3,
+ option_tab_cmd_FUNCTIONS,
+ option_allowed_cmd_FUNCTIONS
+ },
+
+ { CMD_CALCULATE,
+ false,
+ false,
+ false,
+ "CALCULATE",
+ 0,
+ "wszst CALCULATE expression...",
+ "Calculate each expression and print the result to standard output.",
+ 0,
+ 1,
+ option_tab_cmd_CALCULATE,
+ option_allowed_cmd_CALCULATE
+ },
+
+ { CMD_MATRIX,
+ false,
+ false,
+ false,
+ "MATRIX",
+ 0,
+ "wszst MATRIX [patch-option]... [vector]...",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results.",
+ "Use the transformation options as base and calculate and print the"
+ " related vectors and the transformation matrices. Then do a forward"
+ " and backward transformation for each vector parameter using the"
+ " matrices and print the results. The transformations are done with 4"
+ " different methods to confirm the algorithms. Only the main results"
+ " and results, which differ, are printed.\n"
+ " Normally, the exit status is OK (null). If at least one old"
+ " transformation returns different results for the different"
+ " algorithms, then status DIFFER (not null) is returned.",
+ 20,
+ option_tab_cmd_MATRIX,
+ option_allowed_cmd_MATRIX
+ },
+
+ { CMD_FLOAT,
+ false,
+ false,
+ false,
+ "FLOAT",
+ 0,
+ "wszst FLOAT number...",
+ "This commands helps to convert hex values into floating point numbers"
+ " and vice versa. For each non empty parameter, a line with 4 bytes"
+ " hex and a float, 8 bytes hex and a double float, and the parameter"
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a"
+ " hex string, otherwise it is a floating point number.\n"
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement"
+ " the previous value by the smallest possible value. Use different"
+ " increments for floats and doubles.\n"
+ " All conversions are done using big endian.",
+ 0,
+ 1,
+ option_tab_cmd_FLOAT,
+ option_allowed_cmd_FLOAT
+ },
+
+ { CMD_VR_CALC,
+ false,
+ false,
+ false,
+ "VR-CALC",
+ "VRCALC",
+ "wszst VR-CALC delta...",
+ " Calculate a VR increment for each given delta value"
+ " (=VR_winner-VR_loser). Print results as table.",
+ 0,
+ 2,
+ option_tab_cmd_VR_CALC,
+ option_allowed_cmd_VR_CALC
+ },
+
+ { CMD_VR_RACE,
+ false,
+ false,
+ false,
+ "VR-RACE",
+ "VRRACE",
+ "wszst VR-RACE vr1 vr2...",
+ "Print a table with VR calculations for a race. Each VR is the current"
+ " rating of a player. The vr-list is well ordered: The first VR is"
+ " for the winner and the last VR for the looser. Up to 30 VR values"
+ " will be accpeted. Each VR can be preceeded by \"NUM*\" to define a"
+ " repeat factor.",
+ 0,
+ 1,
+ option_tab_cmd_VR_RACE,
+ option_allowed_cmd_VR_RACE
+ },
+
+ { CMD_AUTOADD,
+ false,
+ false,
+ false,
+ "AUTOADD",
+ 0,
+ "wszst AUTOADD [source]...",
+ "Manage the auto-add library. Primarily add files to the main auto-add"
+ " archive for future use of option --auto-add or to convert WU8 files."
+ " If SOURCE is a directory, all standard track and arena file names"
+ " are searched for the missed auto-add files. Without source files,"
+ " the status of the auto-add archive is printed.\n"
+ " Try 'wszst AUTOADD ./path_to/Race/Course/' to add all supported"
+ " files.",
+ 0,
+ 8,
+ option_tab_cmd_AUTOADD,
+ option_allowed_cmd_AUTOADD
+ },
+
+ { CMD_TRACKS,
+ false,
+ false,
+ false,
+ "TRACKS",
+ 0,
+ "wszst TRACKS [selection_mask]",
+ "Print a list of all known track SZS files of Mario Kart internal"
+ " directory './Race/Course'. These files are 32 standard track files"
+ " and 10 arena files. The first column shows an unique ID of exact 3"
+ " upper case characters or digits. For '_d' files, a 'd' is appended."
+ " The second column shows the internal file name. Use BMG files to"
+ " print real names as third column.",
+ 0,
+ 5,
+ option_tab_cmd_TRACKS,
+ option_allowed_cmd_TRACKS
+ },
+
+ { CMD_SCANCACHE,
+ false,
+ false,
+ false,
+ "SCANCACHE",
+ 0,
+ "wszst SCANCACHE directory\n"
+ "wszst SCANCACHE --cache directory",
+ "Scan the cache directory for SZS files and re-build the checksum"
+ " table. Store the result as file 'cache-content.txt' in the same"
+ " directory. The file is used by option --cache to optimize file"
+ " access.",
+ 0,
+ 2,
+ option_tab_cmd_SCANCACHE,
+ option_allowed_cmd_SCANCACHE
+ },
+
+ { CMD_EXPORT,
+ true,
+ false,
+ false,
+ "_EXPORT",
+ 0,
+ "wszst _EXPORT key...",
+ "This hidden command exports some definitions to standard output. Use"
+ " keyword HELP to get a list of possible keywords.",
+ 0,
+ 0,
+ option_tab_cmd_EXPORT,
+ option_allowed_cmd_EXPORT
+ },
+
+ { CMD_CODE,
+ true,
+ false,
+ false,
+ "_CODE",
+ 0,
+ "wszst _CODE [files]",
+ "All bytes of all input files are xor'ed with 0xDC and copied to"
+ " stdout. If no source file is given, standard input is read.",
+ 0,
+ 0,
+ option_tab_cmd_CODE,
+ option_allowed_cmd_CODE
+ },
+
+ { CMD_RECODE,
+ true,
+ false,
+ false,
+ "_RECODE",
+ 0,
+ "wszst _RECODE mode [files]",
+ "All bytes of all input files are interpreted as 1 file and re-coded."
+ " MODE defines the re-code mode. If no source file is given, standard"
+ " input is read.",
+ 0,
+ 0,
+ option_tab_cmd_RECODE,
+ option_allowed_cmd_RECODE
+ },
+
+ { CMD_SUBFILE,
+ true,
+ false,
+ false,
+ "_SUBFILE",
+ 0,
+ "wszst _SUBFILE [files]",
+ "Test sub-file system.",
+ 0,
+ 8,
+ option_tab_cmd_SUBFILE,
+ option_allowed_cmd_SUBFILE
+ },
+
+ { CMD_LIST,
+ false,
+ false,
+ true,
+ "LIST",
+ "LS",
+ "wszst LIST [source]...",
+ "List all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC"
+ " archives. If listing a directory, then a virtual SZS file is created"
+ " (like CREATE does it) and listed.",
+ 0,
+ 48,
+ option_tab_cmd_LIST,
+ option_allowed_cmd_LIST
+ },
+
+ { CMD_LIST_L,
+ false,
+ false,
+ false,
+ "LIST-L",
+ "LL",
+ "wszst LIST-L [source]...",
+ "List all sub files with size. 'LIST-L' and 'LL' are short cuts for"
+ " 'LIST --long'.",
+ 0,
+ 48,
+ option_tab_cmd_LIST_L,
+ option_allowed_cmd_LIST_L
+ },
+
+ { CMD_LIST_LL,
+ false,
+ false,
+ false,
+ "LIST-LL",
+ "LLL",
+ "wszst LIST-LL [source]...",
+ "List all sub files with offset and size. 'LIST-LL' and 'LLL' are"
+ " short cuts for 'LIST --long --long'.",
+ 0,
+ 48,
+ option_tab_cmd_LIST_LL,
+ option_allowed_cmd_LIST_LL
+ },
+
+ { CMD_LIST_LLL,
+ false,
+ false,
+ false,
+ "LIST-LLL",
+ "LLLL",
+ "wszst LIST-LLL [source]...",
+ "List all sub files with offset and size in debugging mode. 'LIST-LLL'"
+ " and 'LLLL' are short cuts for 'LIST --long --long --long'.",
+ 0,
+ 48,
+ option_tab_cmd_LIST_LLL,
+ option_allowed_cmd_LIST_LLL
+ },
+
+ { CMD_LIST_A,
+ false,
+ false,
+ false,
+ "LIST-A",
+ "LA",
+ "wszst LIST-A [source]...",
+ "List recursive all sub files with size. 'LIST-A' and 'LA' are short"
+ " cuts for 'LIST --long --all --all'.",
+ 0,
+ 48,
+ option_tab_cmd_LIST_A,
+ option_allowed_cmd_LIST_A
+ },
+
+ { CMD_LIST_LA,
+ false,
+ false,
+ false,
+ "LIST-LA",
+ "LLA",
+ "wszst LIST-LA [source]...",
+ "List recursive all sub files with offset and size. 'LIST-LA' and"
+ " 'LLA' are short cuts for 'LIST --long --long --all --all'.",
+ 0,
+ 48,
+ option_tab_cmd_LIST_LA,
+ option_allowed_cmd_LIST_LA
+ },
+
+ { CMD_NAME_REF,
+ false,
+ false,
+ false,
+ "NAME-REF",
+ "NAMEREF",
+ "wszst NAME-REF [source]...",
+ "For each BRRES file or subfile, create a name based cross reference"
+ " and print the result as list ordered by names in BRRES order. For U8"
+ " archives (e.g. track SZS files), sub file course_model.brres is"
+ " analysed.",
+ 0,
+ 3,
+ option_tab_cmd_NAME_REF,
+ option_allowed_cmd_NAME_REF
+ },
+
+ { CMD_ILIST,
+ false,
+ false,
+ true,
+ "ILIST",
+ "IL",
+ "wszst ILIST [source]...",
+ "List the images files of all sub files of SZS, U8, PACK, BRRES,"
+ " BREFF, BREFT and RARC archives; non image files are ignored. If"
+ " listing a directory, then a virtual SZS file is created (like CREATE"
+ " does it) and listed.",
+ 0,
+ 45,
+ option_tab_cmd_ILIST,
+ option_allowed_cmd_ILIST
+ },
+
+ { CMD_ILIST_L,
+ false,
+ false,
+ false,
+ "ILIST-L",
+ "ILL",
+ "wit ILIST-L [source]...",
+ "List all image files with geometry data. 'ILIST-L' and 'ILL' are"
+ " short cuts for 'ILIST --long'.",
+ 0,
+ 45,
+ option_tab_cmd_ILIST_L,
+ option_allowed_cmd_ILIST_L
+ },
+
+ { CMD_ILIST_LL,
+ false,
+ false,
+ false,
+ "ILIST-LL",
+ "ILLL",
+ "wit ILIST-LL [source]...",
+ "List all sub files with advanced geometry data. 'ILIST-LL' and 'ILLL'"
+ " are short cuts for 'ILIST --long --long'.",
+ 0,
+ 45,
+ option_tab_cmd_ILIST_LL,
+ option_allowed_cmd_ILIST_LL
+ },
+
+ { CMD_ILIST_A,
+ false,
+ false,
+ false,
+ "ILIST-A",
+ "ILA",
+ "wszst ILIST-A [source]...",
+ "List recursive all image files. 'ILIST-A' and 'ILA' are short cuts"
+ " for 'ILIST --all'.",
+ 0,
+ 45,
+ option_tab_cmd_ILIST_A,
+ option_allowed_cmd_ILIST_A
+ },
+
+ { CMD_ILIST_LA,
+ false,
+ false,
+ false,
+ "ILIST-LA",
+ "ILLA",
+ "wit ILIST-LA [source]...",
+ "List recursive all image files with geometry data. 'ILIST-LA' and"
+ " 'ILLA' are short cuts for 'ILIST --long --all'.",
+ 0,
+ 45,
+ option_tab_cmd_ILIST_LA,
+ option_allowed_cmd_ILIST_LA
+ },
+
+ { CMD_MEMORY,
+ false,
+ false,
+ true,
+ "MEMORY",
+ "MEM",
+ "wszst MEMORY [source]...",
+ "Dump a memory map of each source file. Virtual images (extracted"
+ " directories) are also supported.",
+ 0,
+ 47,
+ option_tab_cmd_MEMORY,
+ option_allowed_cmd_MEMORY
+ },
+
+ { CMD_MEMORY_A,
+ false,
+ false,
+ false,
+ "MEMORY-A",
+ "MEMA",
+ "wszst MEMORY-A [source]...",
+ "Dump recursive a memory map of each source file. 'MEMORY-A' and"
+ " 'MEMA' are short cuts for 'MEMORY --all --all'.",
+ 0,
+ 47,
+ option_tab_cmd_MEMORY_A,
+ option_allowed_cmd_MEMORY_A
+ },
+
+ { CMD_DUMP,
+ false,
+ false,
+ false,
+ "DUMP",
+ 0,
+ "wszst DUMP [source]...",
+ "Dump the internal structure of a BRRES files, compressed or not."
+ " Other archives are ignored. The main goal is to verify string"
+ " relocation. Virtual images (extracted directories) are also"
+ " supported.",
+ 0,
+ 41,
+ option_tab_cmd_DUMP,
+ option_allowed_cmd_DUMP
+ },
+
+ { CMD_SHA1,
+ false,
+ false,
+ true,
+ "SHA1",
+ 0,
+ "wszst SHA1 [source]...",
+ "Print a SHA1 checksum for each source. The checksum is calculated by"
+ " using the uncompressed data.",
+ 0,
+ 48,
+ option_tab_cmd_SHA1,
+ option_allowed_cmd_SHA1
+ },
+
+ { CMD_ANALYZE,
+ false,
+ false,
+ false,
+ "ANALYZE",
+ "ANA",
+ "wszst ANALYZE [source]...",
+ "Analyse track files and print results in machine readable format.",
+ 0,
+ 13,
+ option_tab_cmd_ANALYZE,
+ option_allowed_cmd_ANALYZE
+ },
+
+ { CMD_DISTRIBUTION,
+ false,
+ false,
+ false,
+ "DISTRIBUTION",
+ "DIST",
+ "wszst DISTRIBUTION result source...\n"
+ "wszst DISTRIBUTION directory [source]...",
+ "Load each SOURCE (SZS, WBZ, U8 or WU8) and calculate a checksum of"
+ " the uncompressed data. If SOURCE is a directory, scan it for SZS,"
+ " WBZ, U8 and WU8 files. If a source directory starts with \"arena\","
+ " all tracks of the directory are assumed to be battle arenas. Finally"
+ " print the results into file RESULT.\n"
+ " The default name for RESULT is \"distribution.txt\". Extension .txt"
+ " is appended to the filename if not defined. If RESULT is a"
+ " directory, it is used as first source too.\n"
+ " If file RESULT exists, it is automatically added as last source to"
+ " the list of option --source, but only if not already added. On"
+ " scanning of file result, parameters are scanned too.",
+ 0,
+ 45,
+ option_tab_cmd_DISTRIBUTION,
+ option_allowed_cmd_DISTRIBUTION
+ },
+
+ { CMD_DIFF,
+ false,
+ false,
+ true,
+ "DIFF",
+ "CMP",
+ "wszst DIFF source1 source2\n"
+ "wszst DIFF source... --dest dest",
+ "Compare two or more sources (each SZS, U8, PACK, BRRES, BREFF, BREFT,"
+ " RARC or directory) on file level and report mismatches for each sub"
+ " file. If option --dest is set, then each source file is compared"
+ " with a file in the destination.",
+ 0,
+ 6,
+ option_tab_cmd_DIFF,
+ option_allowed_cmd_DIFF
+ },
+
+ { CMD_CHECK,
+ false,
+ false,
+ true,
+ "CHECK",
+ 0,
+ "wszst CHECK [source]...",
+ "Make a validity check for track files: Try to read KCL and KMP (and"
+ " check both) and find unknown, modified, needed and unneeded files."
+ " Also analyse cannons and make slot proposals. This command uses an"
+ " internal object and file database. The source can be a SZS, U8, WU8"
+ " or WBZ file, or an U8 like directory.",
+ 0,
+ 90,
+ option_tab_cmd_CHECK,
+ option_allowed_cmd_CHECK
+ },
+
+ { CMD_SLOTS,
+ false,
+ false,
+ false,
+ "SLOTS",
+ 0,
+ "wszst SLOTS [source]...",
+ "Try to find out the slots, that will run a track. Each source can be"
+ " a SZS, U8, WU8 or WBZ file, or an U8 like directory. For each source"
+ " one status line is printed. The status line contains either a"
+ " positive or a negative slot list, whatever is shorter. For battle"
+ " arenas, the keyword ARENA is printed.",
+ 0,
+ 86,
+ option_tab_cmd_SLOTS,
+ option_allowed_cmd_SLOTS
+ },
+
+ { CMD_STGI,
+ false,
+ false,
+ false,
+ "STGI",
+ 0,
+ "wszst STGI [source]...",
+ "Find the first KMP:STGI of each file and print an analysis of it as"
+ " single line statistic. Additional the number of lap counter check"
+ " points ('LC') is printed. Track and KMP (binary and text) files are"
+ " accepted as input.",
+ 0,
+ 4,
+ option_tab_cmd_STGI,
+ option_allowed_cmd_STGI
+ },
+
+ { CMD_ISARENA,
+ false,
+ false,
+ false,
+ "ISARENA",
+ 0,
+ "wszst ISARENA [source]...",
+ "Analyse each track for its arena status and print a line with a"
+ " status code and the track name. The status code is: »-RACE« for a"
+ " racing track, »?MAYBE« for likely an arena, »+ARENA« for an"
+ " arena, »+DISPATCH« for an arena with dispatch points or any error"
+ " hint beginning with an »!«. So the very first character (one of"
+ " »!-?+«) can be used to distinguish the status class.\n"
+ " The exit status is >2 on error, 2 (DIFFER), if at least one file is"
+ " a racing track, or 0 (OK), if all sources are arenas.",
+ 0,
+ 6,
+ option_tab_cmd_ISARENA,
+ option_allowed_cmd_ISARENA
+ },
+
+ { CMD_NORMALIZE,
+ false,
+ false,
+ false,
+ "NORMALIZE",
+ "NORM",
+ "wszst NORMALIZE [source]...",
+ "Normalize an U8 archive, compressed or not: The files are sorted in"
+ " `Nintendo like' order and unused data holes are removed. If"
+ " directory '.' is available it becomes the root directory for all"
+ " others. Compressed sources are compressed again with maximum"
+ " compression (level 9). The destination is only written if any data"
+ " changed.\n"
+ " 'wszst NORMALIZE' is the same as 'wszst PATCH --norm'.",
+ 0,
+ 74,
+ option_tab_cmd_NORMALIZE,
+ option_allowed_cmd_NORMALIZE
+ },
+
+ { CMD_PATCH,
+ false,
+ false,
+ false,
+ "PATCH",
+ 0,
+ "wszst PATCH [source]...",
+ "Patch an U8 archive, compressed or not: Load the archive, apply all"
+ " patching and transforming options and store the file again."
+ " Compressed sources are compressed again. The destination is only"
+ " written if any data changed.",
+ 0,
+ 75,
+ option_tab_cmd_PATCH,
+ option_allowed_cmd_PATCH
+ },
+
+ { CMD_COPY,
+ false,
+ false,
+ false,
+ "COPY",
+ "CP",
+ "wszst COPY source dest\n"
+ "wszst COPY source... [-d|-D] dest",
+ "COPY is an alternative command for copying and patching files. It"
+ " uses the same internal procedure as command PATCH, but has another"
+ " command line syntax.\n"
+ " The command copies all source files to the destination. If more than"
+ " 1 source is defined, the destination must be either a directory or a"
+ " destination filename with escapes. Patching is also possible and"
+ " option --overwrite is set implicitly.",
+ 0,
+ 75,
+ option_tab_cmd_COPY,
+ option_allowed_cmd_COPY
+ },
+
+ { CMD_DUPLICATE,
+ false,
+ false,
+ false,
+ "DUPLICATE",
+ "DUP",
+ "wszst DUPLICATE source [-d|-D] dest",
+ "The command reads a single track file and duplicates it several times"
+ " to DEST. Therefor it analyzes the presence flags combinations with"
+ " and without extension support and creates one file for each relevant"
+ " scenario. A LEX section TEST will be inserted to force the execution"
+ " mode for offline tests.\n"
+ " The destination filename (not directory part) is searched for the"
+ " first occurance of '@'. If not found, the place before the last"
+ " point is used. At this place an identification string is inserted.\n"
+ " Depending on option --gamemodes up to 1573 files will be created."
+ " So the use of option --fast is recommended to speed up the process."
+ " Use command 'wkmpt GAMEMODES' to list all variants and to check them"
+ " beforehand.",
+ 0,
+ 76,
+ option_tab_cmd_DUPLICATE,
+ option_allowed_cmd_DUPLICATE
+ },
+
+ { CMD_MINIMAP,
+ false,
+ false,
+ false,
+ "MINIMAP",
+ 0,
+ "wszst MINIMAP [source]...",
+ "Print minimap data (more exact: the visual field of the minimap) of a"
+ " SZS, U8, BRRES or MDL file. If patching options are used, modify the"
+ " data and write back the file using its original file format. Only"
+ " the translation vector is modified and new translation and inverse"
+ " matrices are calculated.",
+ 0,
+ 46,
+ option_tab_cmd_MINIMAP,
+ option_allowed_cmd_MINIMAP
+ },
+
+ { CMD_COMPRESS,
+ false,
+ false,
+ false,
+ "COMPRESS",
+ "COM",
+ "wszst COMPRESS [source]...",
+ "Compress and create a SZS archives. If the source is already"
+ " compressed, then decompress and compress it again. The default"
+ " destination is '%P/%N.szs'.",
+ 0,
+ 75,
+ option_tab_cmd_COMPRESS,
+ option_allowed_cmd_COMPRESS
+ },
+
+ { CMD_DECOMPRESS,
+ false,
+ false,
+ false,
+ "DECOMPRESS",
+ "DEC",
+ "wszst DECOMPRESS [szs]...",
+ "Decompress SZS files. The default destination is '%P/%N.u8'.",
+ 0,
+ 68,
+ option_tab_cmd_DECOMPRESS,
+ option_allowed_cmd_DECOMPRESS
+ },
+
+ { CMD_ENCODE,
+ false,
+ false,
+ false,
+ "ENCODE",
+ "E",
+ "wszst ENCODE [source_dir]...",
+ " Create and/or encode sub files if necessary. It works like command"
+ " CREATE, but without creating a new first level archive file.",
+ 0,
+ 69,
+ option_tab_cmd_ENCODE,
+ option_allowed_cmd_ENCODE
+ },
+
+ { CMD_CREATE,
+ false,
+ false,
+ false,
+ "CREATE",
+ "C",
+ "wszst CREATE [source_dir]...",
+ "Create SZS, U8, PACK, BRRES, BREFF, BREFT or RARC archives by adding"
+ " all not hidden files of the directory structure. Create and/or"
+ " encode sub files if necessary. The default destination is '%P/%N%T'.",
+ 0,
+ 95,
+ option_tab_cmd_CREATE,
+ option_allowed_cmd_CREATE
+ },
+
+ { CMD_UPDATE,
+ false,
+ false,
+ false,
+ "UPDATE",
+ "U",
+ "wszst UPDATE [source]... [--source=] [--dest=]",
+ "Update an existing SZS, U8, PACK, BRRES, BREFF, BREFT and"
+ " RARCarchive. This is done in similar way as the EXTRACT command, but"
+ " instead of extracting, source files are searched in a prior"
+ " extracted archive. Only files with the same size are updated. The"
+ " secondary source is used to find the source sub files. The default"
+ " secondary source is '%P/%N.d/'.",
+ 0,
+ 68,
+ option_tab_cmd_UPDATE,
+ option_allowed_cmd_UPDATE
+ },
+
+ { CMD_EXTRACT,
+ false,
+ false,
+ false,
+ "EXTRACT",
+ "X",
+ "wszst EXTRACT [source]...",
+ "Extract all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC"
+ " archives. The default destination is '%P/%N.d/'.",
+ 0,
+ 73,
+ option_tab_cmd_EXTRACT,
+ option_allowed_cmd_EXTRACT
+ },
+
+ { CMD_XDECODE,
+ false,
+ false,
+ false,
+ "XDECODE",
+ "XD",
+ "wszst XDECODE [source]...",
+ "Command XDECODE is a short cut for 'EXTRACT --decode'. It extract all"
+ " sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC archives"
+ " and decodes all supported files. The default destination is"
+ " '%P/%N.d/'.",
+ 0,
+ 73,
+ option_tab_cmd_XDECODE,
+ option_allowed_cmd_XDECODE
+ },
+
+ { CMD_XEXPORT,
+ false,
+ false,
+ false,
+ "XEXPORT",
+ "XX",
+ "wszst XEXPORT [source]...",
+ "Command XEXPORT is a short cut for 'EXTRACT --decode --export'. It"
+ " extract all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC"
+ " archives and decodes all supported files with enabled export mode."
+ " The default destination is '%P/%N.d/'.",
+ 0,
+ 73,
+ option_tab_cmd_XEXPORT,
+ option_allowed_cmd_XEXPORT
+ },
+
+ { CMD_XALL,
+ false,
+ false,
+ false,
+ "XALL",
+ "XA",
+ "wszst XALL [source]...",
+ "Command XALL is a short cut for 'EXTRACT --all'. It extract all sub"
+ " files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC archives"
+ " recursively and decodes all supported files. The default destination"
+ " is '%P/%N.d/'.",
+ 0,
+ 73,
+ option_tab_cmd_XALL,
+ option_allowed_cmd_XALL
+ },
+
+ { CMD_XCOMMON,
+ false,
+ false,
+ false,
+ "XCOMMON",
+ 0,
+ "wszst XCOMMON [source]...",
+ "Command XCOMMON is a short cut for 'EXTRACT --basedir=common'. Scan"
+ " archives and extract files from archives, that are below directory"
+ " 'common'. The default destination is '%P/%N.d/'.",
+ 0,
+ 9,
+ option_tab_cmd_XCOMMON,
+ option_allowed_cmd_XCOMMON
+ },
+
+ { CMD_BINARY,
+ false,
+ false,
+ true,
+ "BINARY",
+ "BIN",
+ "wszst BINARY [source]...",
+ "Read each source file (binary or text, but never archives) and write"
+ " the content as binary file. The file extension of the new file"
+ " depends on the file type, but is usually .bin. Currently supported"
+ " file formats are BMG, GEOHIT, ITEMSLOT, KCL, KMG, KMP, LEX, OBJFLOW,"
+ " PAT and the related text formats.",
+ 0,
+ 11,
+ option_tab_cmd_BINARY,
+ option_allowed_cmd_BINARY
+ },
+
+ { CMD_TEXT,
+ false,
+ false,
+ false,
+ "TEXT",
+ "TXT",
+ "wszst TEXT [source]...",
+ "Read each source file (binary or text, but never archives) and write"
+ " the content as text file. The file extension of the new file is"
+ " usually .txt. Currently supported file formats are BMG, GEOHIT,"
+ " ITEMSLOT, KCL, KMG, KMP, LEX, OBJFLOW, PAT and the related text"
+ " formats.",
+ 0,
+ 31,
+ option_tab_cmd_TEXT,
+ option_allowed_cmd_TEXT
+ },
+
+ { CMD_CAT,
+ false,
+ false,
+ false,
+ "CAT",
+ 0,
+ "wszst CAT [source/subfile]...",
+ "Extract one or more sub files of SZS, U8, PACK, BRRES, BREFF, BREFT"
+ " and RARC archives. The output of all source files is concatenated"
+ " and written to stdout.",
+ 0,
+ 21,
+ option_tab_cmd_CAT,
+ option_allowed_cmd_CAT
+ },
+
+ { CMD_BMG,
+ false,
+ false,
+ false,
+ "BMG",
+ 0,
+ "wszst BMG [source]...",
+ "For each archive all BMG sub files are searched and, if found,"
+ " decoded and printed as combined BMG text file. The command works"
+ " exactly like 'wbmgt MIX'.",
+ 0,
+ 17,
+ option_tab_cmd_BMG,
+ option_allowed_cmd_BMG
+ },
+
+ { CMD_KCL,
+ false,
+ false,
+ false,
+ "KCL",
+ 0,
+ "wszst KCL [source]...",
+ "For each archive the KCL sub file course.kcl is searched and, if"
+ " found, decoded and printed (copied to stdout).\n"
+ " Automated dropping of bad KCL triangles is enabled if no other drop"
+ " option is specified by option --kcl.",
+ 0,
+ 50,
+ option_tab_cmd_KCL,
+ option_allowed_cmd_KCL
+ },
+
+ { CMD_KMP,
+ false,
+ false,
+ false,
+ "KMP",
+ 0,
+ "wszst KMP [source]...",
+ "For each archive the KMP sub file course.kmp is searched and, if"
+ " found, decoded and printed (copied to stdout).",
+ 0,
+ 51,
+ option_tab_cmd_KMP,
+ option_allowed_cmd_KMP
+ },
+
+ { CMD_LEX,
+ false,
+ false,
+ false,
+ "LEX",
+ 0,
+ "wszst LEX [source]...",
+ "For each archive the LEX sub file course.lex is searched and, if"
+ " found, decoded and printed (copied to stdout).",
+ 0,
+ 4,
+ option_tab_cmd_LEX,
+ option_allowed_cmd_LEX
+ },
+
+ { CMD_INFO,
+ false,
+ false,
+ false,
+ "INFO",
+ 0,
+ "wszst INFO [source]...",
+ "For each archive a file named info.txt and, if not found, credits.txt"
+ " is searched, ignoring case. The first found file of each archive is"
+ " printed (copied to stdout).",
+ 0,
+ 2,
+ option_tab_cmd_INFO,
+ option_allowed_cmd_INFO
+ },
+
+ { CMD_GHOST,
+ true,
+ false,
+ false,
+ "GHOSTS",
+ 0,
+ "wszst GHOST [source]...",
+ "Analyse each file and print a summary about the ghost data.",
+ 0,
+ 12,
+ option_tab_cmd_GHOST,
+ option_allowed_cmd_GHOST
+ },
+
+ { CMD_YAZDUMP,
+ false,
+ false,
+ false,
+ "YAZDUMP",
+ "YD",
+ "wszst YAZDUMP [szs]...",
+ "Analyze YAZ compression print a dump to stdout. Ignore files without"
+ " YAZ compression.",
+ 0,
+ 8,
+ option_tab_cmd_YAZDUMP,
+ option_allowed_cmd_YAZDUMP
+ },
+
+ { CMD_VEHICLE,
+ true,
+ false,
+ true,
+ "VEHICLE",
+ 0,
+ "wszst VEHICLE job ...",
+ "Hidden vehicle settings command.",
+ 0,
+ 7,
+ option_tab_cmd_VEHICLE,
+ option_allowed_cmd_VEHICLE
+ },
+
+ {0,0,0,0,0,0,0,0,0,0,0,0}
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// InfoUI ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const InfoUI_t InfoUI_wszst =
+{
+ "wszst",
+ CMD__N,
+ CommandTab,
+ CommandInfo,
+ OPT__N_SPECIFIC,
+ OPT__N_TOTAL,
+ OptionInfo,
+ OptionUsed,
+ OptionIndex,
+ OptionShort,
+ OptionLong
+};
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
diff --git a/project/src/ui/ui-wszst.h b/project/src/ui/ui-wszst.h
new file mode 100644
index 0000000..ee85a24
--- /dev/null
+++ b/project/src/ui/ui-wszst.h
@@ -0,0 +1,1226 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************
+ * *
+ * >>> This file is automatically generated by './src/gen-ui.c'. <<< *
+ * >>> Do not edit this file! <<< *
+ * *
+ ***************************************************************************/
+
+
+#ifndef SZS_UI_WSZST_H
+#define SZS_UI_WSZST_H
+#include "dclib-basics.h"
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptions ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumOptions
+{
+ OPT_NONE,
+
+ //----- command specific options -----
+
+ OPT_TOUCH,
+ OPT_AUTO,
+ OPT_SET_FLAGS,
+ OPT_SET_SCALE,
+ OPT_SET_ROT,
+ OPT_SET_X,
+ OPT_SET_Y,
+ OPT_SET_Z,
+ OPT_XCENTER,
+ OPT_YCENTER,
+ OPT_ZCENTER,
+ OPT_CENTER,
+ OPT_SCALE,
+ OPT_SHIFT,
+ OPT_XSS,
+ OPT_YSS,
+ OPT_ZSS,
+ OPT_ROT,
+ OPT_XROT,
+ OPT_YROT,
+ OPT_ZROT,
+ OPT_YPOS,
+ OPT_TRANSLATE,
+ OPT_NULL,
+ OPT_NEXT,
+ OPT_ASCALE,
+ OPT_AROT,
+ OPT_TFORM_SCRIPT,
+ OPT_MINIMAP,
+ OPT_RM_GOBJ,
+ OPT_SLOT,
+ OPT_KCL_FLAG,
+ OPT_KCL_SCRIPT,
+ OPT_FLAG_FILE,
+ OPT_REPAIR_XPF,
+ OPT_GAMEMODES,
+ OPT_LOAD_BMG,
+ OPT_PATCH_BMG,
+ OPT_MACRO_BMG,
+ OPT_FILTER_BMG,
+ OPT_ID,
+ OPT_BASE64,
+ OPT_DB64,
+ OPT_CODING,
+ OPT_VERIFY,
+ OPT_ROUND,
+ OPT_LONG,
+ OPT_NO_HEADER,
+ OPT_BRIEF,
+ OPT_PIPE,
+ OPT_DELTA,
+ OPT_DIFF,
+ OPT_EPSILON,
+ OPT_BMG_ENCODING,
+ OPT_BMG_INF_SIZE,
+ OPT_BMG_MID,
+ OPT_FORCE_ATTRIB,
+ OPT_DEF_ATTRIB,
+ OPT_NO_ATTRIB,
+ OPT_X_ESCAPES,
+ OPT_OLD_ESCAPES,
+ OPT_SINGLE_LINE,
+ OPT_NO_BMG_COLORS,
+ OPT_BMG_COLORS,
+ OPT_NO_BMG_INLINE,
+ OPT_EXPORT,
+ OPT_NO_PARAM,
+ OPT_SORT,
+ OPT_TRANSFORM,
+ OPT_STRIP,
+ OPT_ANALYZE,
+ OPT_ANALYZE_MODE,
+ OPT_SOURCE,
+ OPT_DEST,
+ OPT_DEST2,
+ OPT_ESC,
+ OPT_OVERWRITE,
+ OPT_NUMBER,
+ OPT_REMOVE_SRC,
+ OPT_REMOVE_DEST,
+ OPT_UPDATE,
+ OPT_PRESERVE,
+ OPT_IGNORE,
+ OPT_IGNORE_SETUP,
+ OPT_PURGE,
+ OPT_ALIGN_U8,
+ OPT_ALIGN_PACK,
+ OPT_ALIGN_BRRES,
+ OPT_ALIGN_BREFF,
+ OPT_ALIGN_BREFT,
+ OPT_ALIGN,
+ OPT_ENCODE_ALL,
+ OPT_ENCODE_IMG,
+ OPT_NO_ENCODE,
+ OPT_NO_RECURSE,
+ OPT_AUTO_ADD,
+ OPT_NO_ECHO,
+ OPT_NO_CHECK,
+ OPT_PT_DIR,
+ OPT_RM_AIPARAM,
+ OPT_U8,
+ OPT_SZS,
+ OPT_WU8,
+ OPT_XWU8,
+ OPT_WBZ,
+ OPT_PACK,
+ OPT_BRRES,
+ OPT_BREFF,
+ OPT_BREFT,
+ OPT_NO_COMPRESS,
+ OPT_COMPRESS,
+ OPT_FAST,
+ OPT_NORM,
+ OPT_LINKS,
+ OPT_BASEDIR,
+ OPT_RECURSE,
+ OPT_EXT,
+ OPT_DECODE,
+ OPT_MIPMAPS,
+ OPT_NO_MIPMAPS,
+ OPT_N_MIPMAPS,
+ OPT_MAX_MIPMAPS,
+ OPT_MIPMAP_SIZE,
+ OPT_FAST_MIPMAPS,
+ OPT_CMPR_DEFAULT,
+ OPT_CUT,
+ OPT_ALL,
+ OPT_RAW,
+ OPT_SECTIONS,
+
+ OPT__N_SPECIFIC, // == 130
+
+ //----- global options -----
+
+ OPT_VERSION,
+ OPT_HELP,
+ OPT_XHELP,
+ OPT_ALLOW_ALL,
+ OPT_COMPATIBLE,
+ OPT_WIDTH,
+ OPT_QUIET,
+ OPT_VERBOSE,
+ OPT_LOGGING,
+ OPT_DE,
+ OPT_COLORS,
+ OPT_NO_COLORS,
+ OPT_CT_CODE,
+ OPT_LE_CODE,
+ OPT_CHDIR,
+ OPT_CONST,
+ OPT_BATTLE,
+ OPT_EXPORT_FLAGS,
+ OPT_ROUTE_OPTIONS,
+ OPT_WIM0,
+ OPT_LOAD_KCL,
+ OPT_KCL,
+ OPT_TRI_AREA,
+ OPT_TRI_HEIGHT,
+ OPT_XTRIDATA,
+ OPT_KMP,
+ OPT_SPEED_MOD,
+ OPT_KTPT2,
+ OPT_TFORM_KMP,
+ OPT_MDL,
+ OPT_PAT,
+ OPT_PATCH_FILE,
+ OPT_KMG_LIMIT,
+ OPT_KMG_COPY,
+ OPT_LT_CLEAR,
+ OPT_LT_ONLINE,
+ OPT_LT_N_PLAYERS,
+ OPT_LT_COND_BIT,
+ OPT_LT_GAME_MODE,
+ OPT_LT_ENGINE,
+ OPT_LT_RANDOM,
+ OPT_LEX_PURGE,
+ OPT_CACHE,
+ OPT_CNAME,
+ OPT_MAX_FILE_SIZE,
+ OPT_TRACKS,
+ OPT_ARENAS,
+ OPT_AUTOADD_PATH,
+ OPT_UTF_8,
+ OPT_NO_UTF_8,
+ OPT_TEST,
+ OPT_FORCE,
+ OPT_REPAIR_MAGICS,
+ OPT_TINY,
+ OPT_YAZ0,
+ OPT_YAZ1,
+ OPT_XYZ,
+ OPT_BZ,
+ OPT_SH,
+ OPT_BASH,
+ OPT_JSON,
+ OPT_PHP,
+ OPT_MAKEDOC,
+ OPT_VAR,
+ OPT_ARRAY,
+ OPT_AVAR,
+ OPT_OLD,
+ OPT_STD,
+ OPT_NEW,
+ OPT_EXTRACT,
+
+ OPT__N_TOTAL // == 200
+
+} enumOptions;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumOptionsBit ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// ***** only for verification *****
+
+//typedef enum enumOptionsBit
+//{
+// //----- command specific options -----
+//
+// OB_TOUCH = 1llu << OPT_TOUCH,
+// OB_AUTO = 1llu << OPT_AUTO,
+// OB_SET_FLAGS = 1llu << OPT_SET_FLAGS,
+// OB_SET_SCALE = 1llu << OPT_SET_SCALE,
+// OB_SET_ROT = 1llu << OPT_SET_ROT,
+// OB_SET_X = 1llu << OPT_SET_X,
+// OB_SET_Y = 1llu << OPT_SET_Y,
+// OB_SET_Z = 1llu << OPT_SET_Z,
+// OB_XCENTER = 1llu << OPT_XCENTER,
+// OB_YCENTER = 1llu << OPT_YCENTER,
+// OB_ZCENTER = 1llu << OPT_ZCENTER,
+// OB_CENTER = 1llu << OPT_CENTER,
+// OB_SCALE = 1llu << OPT_SCALE,
+// OB_SHIFT = 1llu << OPT_SHIFT,
+// OB_XSS = 1llu << OPT_XSS,
+// OB_YSS = 1llu << OPT_YSS,
+// OB_ZSS = 1llu << OPT_ZSS,
+// OB_ROT = 1llu << OPT_ROT,
+// OB_XROT = 1llu << OPT_XROT,
+// OB_YROT = 1llu << OPT_YROT,
+// OB_ZROT = 1llu << OPT_ZROT,
+// OB_YPOS = 1llu << OPT_YPOS,
+// OB_TRANSLATE = 1llu << OPT_TRANSLATE,
+// OB_NULL = 1llu << OPT_NULL,
+// OB_NEXT = 1llu << OPT_NEXT,
+// OB_ASCALE = 1llu << OPT_ASCALE,
+// OB_AROT = 1llu << OPT_AROT,
+// OB_TFORM_SCRIPT = 1llu << OPT_TFORM_SCRIPT,
+// OB_MINIMAP = 1llu << OPT_MINIMAP,
+// OB_RM_GOBJ = 1llu << OPT_RM_GOBJ,
+// OB_SLOT = 1llu << OPT_SLOT,
+// OB_KCL_FLAG = 1llu << OPT_KCL_FLAG,
+// OB_KCL_SCRIPT = 1llu << OPT_KCL_SCRIPT,
+// OB_FLAG_FILE = 1llu << OPT_FLAG_FILE,
+// OB_REPAIR_XPF = 1llu << OPT_REPAIR_XPF,
+// OB_GAMEMODES = 1llu << OPT_GAMEMODES,
+// OB_LOAD_BMG = 1llu << OPT_LOAD_BMG,
+// OB_PATCH_BMG = 1llu << OPT_PATCH_BMG,
+// OB_MACRO_BMG = 1llu << OPT_MACRO_BMG,
+// OB_FILTER_BMG = 1llu << OPT_FILTER_BMG,
+// OB_ID = 1llu << OPT_ID,
+// OB_BASE64 = 1llu << OPT_BASE64,
+// OB_DB64 = 1llu << OPT_DB64,
+// OB_CODING = 1llu << OPT_CODING,
+// OB_VERIFY = 1llu << OPT_VERIFY,
+// OB_ROUND = 1llu << OPT_ROUND,
+// OB_LONG = 1llu << OPT_LONG,
+// OB_NO_HEADER = 1llu << OPT_NO_HEADER,
+// OB_BRIEF = 1llu << OPT_BRIEF,
+// OB_PIPE = 1llu << OPT_PIPE,
+// OB_DELTA = 1llu << OPT_DELTA,
+// OB_DIFF = 1llu << OPT_DIFF,
+// OB_EPSILON = 1llu << OPT_EPSILON,
+// OB_BMG_ENCODING = 1llu << OPT_BMG_ENCODING,
+// OB_BMG_INF_SIZE = 1llu << OPT_BMG_INF_SIZE,
+// OB_BMG_MID = 1llu << OPT_BMG_MID,
+// OB_FORCE_ATTRIB = 1llu << OPT_FORCE_ATTRIB,
+// OB_DEF_ATTRIB = 1llu << OPT_DEF_ATTRIB,
+// OB_NO_ATTRIB = 1llu << OPT_NO_ATTRIB,
+// OB_X_ESCAPES = 1llu << OPT_X_ESCAPES,
+// OB_OLD_ESCAPES = 1llu << OPT_OLD_ESCAPES,
+// OB_SINGLE_LINE = 1llu << OPT_SINGLE_LINE,
+// OB_NO_BMG_COLORS = 1llu << OPT_NO_BMG_COLORS,
+// OB_BMG_COLORS = 1llu << OPT_BMG_COLORS,
+// OB_NO_BMG_INLINE = 1llu << OPT_NO_BMG_INLINE,
+// OB_EXPORT = 1llu << OPT_EXPORT,
+// OB_NO_PARAM = 1llu << OPT_NO_PARAM,
+// OB_SORT = 1llu << OPT_SORT,
+// OB_TRANSFORM = 1llu << OPT_TRANSFORM,
+// OB_STRIP = 1llu << OPT_STRIP,
+// OB_ANALYZE = 1llu << OPT_ANALYZE,
+// OB_ANALYZE_MODE = 1llu << OPT_ANALYZE_MODE,
+// OB_SOURCE = 1llu << OPT_SOURCE,
+// OB_DEST = 1llu << OPT_DEST,
+// OB_DEST2 = 1llu << OPT_DEST2,
+// OB_ESC = 1llu << OPT_ESC,
+// OB_OVERWRITE = 1llu << OPT_OVERWRITE,
+// OB_NUMBER = 1llu << OPT_NUMBER,
+// OB_REMOVE_SRC = 1llu << OPT_REMOVE_SRC,
+// OB_REMOVE_DEST = 1llu << OPT_REMOVE_DEST,
+// OB_UPDATE = 1llu << OPT_UPDATE,
+// OB_PRESERVE = 1llu << OPT_PRESERVE,
+// OB_IGNORE = 1llu << OPT_IGNORE,
+// OB_IGNORE_SETUP = 1llu << OPT_IGNORE_SETUP,
+// OB_PURGE = 1llu << OPT_PURGE,
+// OB_ALIGN_U8 = 1llu << OPT_ALIGN_U8,
+// OB_ALIGN_PACK = 1llu << OPT_ALIGN_PACK,
+// OB_ALIGN_BRRES = 1llu << OPT_ALIGN_BRRES,
+// OB_ALIGN_BREFF = 1llu << OPT_ALIGN_BREFF,
+// OB_ALIGN_BREFT = 1llu << OPT_ALIGN_BREFT,
+// OB_ALIGN = 1llu << OPT_ALIGN,
+// OB_ENCODE_ALL = 1llu << OPT_ENCODE_ALL,
+// OB_ENCODE_IMG = 1llu << OPT_ENCODE_IMG,
+// OB_NO_ENCODE = 1llu << OPT_NO_ENCODE,
+// OB_NO_RECURSE = 1llu << OPT_NO_RECURSE,
+// OB_AUTO_ADD = 1llu << OPT_AUTO_ADD,
+// OB_NO_ECHO = 1llu << OPT_NO_ECHO,
+// OB_NO_CHECK = 1llu << OPT_NO_CHECK,
+// OB_PT_DIR = 1llu << OPT_PT_DIR,
+// OB_RM_AIPARAM = 1llu << OPT_RM_AIPARAM,
+// OB_U8 = 1llu << OPT_U8,
+// OB_SZS = 1llu << OPT_SZS,
+// OB_WU8 = 1llu << OPT_WU8,
+// OB_XWU8 = 1llu << OPT_XWU8,
+// OB_WBZ = 1llu << OPT_WBZ,
+// OB_PACK = 1llu << OPT_PACK,
+// OB_BRRES = 1llu << OPT_BRRES,
+// OB_BREFF = 1llu << OPT_BREFF,
+// OB_BREFT = 1llu << OPT_BREFT,
+// OB_NO_COMPRESS = 1llu << OPT_NO_COMPRESS,
+// OB_COMPRESS = 1llu << OPT_COMPRESS,
+// OB_FAST = 1llu << OPT_FAST,
+// OB_NORM = 1llu << OPT_NORM,
+// OB_LINKS = 1llu << OPT_LINKS,
+// OB_BASEDIR = 1llu << OPT_BASEDIR,
+// OB_RECURSE = 1llu << OPT_RECURSE,
+// OB_EXT = 1llu << OPT_EXT,
+// OB_DECODE = 1llu << OPT_DECODE,
+// OB_MIPMAPS = 1llu << OPT_MIPMAPS,
+// OB_NO_MIPMAPS = 1llu << OPT_NO_MIPMAPS,
+// OB_N_MIPMAPS = 1llu << OPT_N_MIPMAPS,
+// OB_MAX_MIPMAPS = 1llu << OPT_MAX_MIPMAPS,
+// OB_MIPMAP_SIZE = 1llu << OPT_MIPMAP_SIZE,
+// OB_FAST_MIPMAPS = 1llu << OPT_FAST_MIPMAPS,
+// OB_CMPR_DEFAULT = 1llu << OPT_CMPR_DEFAULT,
+// OB_CUT = 1llu << OPT_CUT,
+// OB_ALL = 1llu << OPT_ALL,
+// OB_RAW = 1llu << OPT_RAW,
+// OB_SECTIONS = 1llu << OPT_SECTIONS,
+//
+// //----- group & command options -----
+//
+// OB_GRP_TRANSFORM = OB_SCALE
+// | OB_SHIFT
+// | OB_XSS
+// | OB_YSS
+// | OB_ZSS
+// | OB_ROT
+// | OB_XROT
+// | OB_YROT
+// | OB_ZROT
+// | OB_YPOS
+// | OB_TRANSLATE
+// | OB_NULL
+// | OB_NEXT
+// | OB_ASCALE
+// | OB_AROT
+// | OB_TFORM_SCRIPT,
+//
+// OB_GRP_TRANSFORM2 = OB_GRP_TRANSFORM
+// | OB_RM_GOBJ
+// | OB_SLOT
+// | OB_KCL_FLAG
+// | OB_KCL_SCRIPT
+// | OB_REPAIR_XPF
+// | OB_MINIMAP
+// | OB_PATCH_BMG
+// | OB_MACRO_BMG
+// | OB_FILTER_BMG,
+//
+// OB_GRP_DEST = OB_DEST
+// | OB_DEST2
+// | OB_ESC
+// | OB_PRESERVE
+// | OB_UPDATE
+// | OB_OVERWRITE
+// | OB_NUMBER
+// | OB_REMOVE_DEST,
+//
+// OB_GRP_FFORMAT1 = OB_U8
+// | OB_WU8
+// | OB_SZS
+// | OB_XWU8
+// | OB_WBZ,
+//
+// OB_GRP_FFORMAT2 = OB_U8
+// | OB_WU8
+// | OB_PACK
+// | OB_BRRES
+// | OB_BREFF
+// | OB_BREFT
+// | OB_SZS
+// | OB_XWU8
+// | OB_WBZ,
+//
+// OB_GRP_SCRIPT = 0,
+//
+// OB_GRP_ALIGN = OB_ALIGN_U8
+// | OB_ALIGN_PACK
+// | OB_ALIGN_BRRES
+// | OB_ALIGN_BREFF
+// | OB_ALIGN_BREFT
+// | OB_ALIGN,
+//
+// OB_GRP_TEXTOUT = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_DELTA
+// | OB_DIFF
+// | OB_EXPORT
+// | OB_NO_PARAM,
+//
+// OB_GRP_BMG = OB_BMG_ENCODING
+// | OB_BMG_INF_SIZE
+// | OB_BMG_MID
+// | OB_FORCE_ATTRIB
+// | OB_DEF_ATTRIB
+// | OB_NO_ATTRIB
+// | OB_X_ESCAPES
+// | OB_OLD_ESCAPES
+// | OB_SINGLE_LINE
+// | OB_NO_BMG_COLORS
+// | OB_BMG_COLORS
+// | OB_NO_BMG_INLINE
+// | OB_LONG
+// | OB_EXPORT,
+//
+// OB_GRP_ENCODE = OB_ENCODE_ALL
+// | OB_ENCODE_IMG
+// | OB_ALL
+// | OB_NO_ENCODE
+// | OB_NO_RECURSE
+// | OB_NO_ECHO
+// | OB_NO_CHECK
+// | OB_TRANSFORM
+// | OB_STRIP,
+//
+// OB_GRP_CREATE = OB_IGNORE_SETUP
+// | OB_GRP_FFORMAT2
+// | OB_PT_DIR
+// | OB_LINKS
+// | OB_RM_AIPARAM
+// | OB_GRP_ALIGN
+// | OB_GRP_ENCODE
+// | OB_AUTO_ADD
+// | OB_MIPMAPS
+// | OB_NO_MIPMAPS
+// | OB_N_MIPMAPS
+// | OB_MAX_MIPMAPS
+// | OB_MIPMAP_SIZE
+// | OB_FAST_MIPMAPS
+// | OB_CMPR_DEFAULT,
+//
+// OB_GRP_NORM = OB_NORM
+// | OB_LINKS
+// | OB_GRP_ALIGN
+// | OB_PT_DIR
+// | OB_RM_AIPARAM
+// | OB_AUTO_ADD,
+//
+// OB_GRP_EXTRACT = OB_BASEDIR
+// | OB_RECURSE
+// | OB_EXT
+// | OB_LINKS
+// | OB_DECODE
+// | OB_MIPMAPS
+// | OB_NO_MIPMAPS
+// | OB_FAST_MIPMAPS
+// | OB_CMPR_DEFAULT
+// | OB_CUT
+// | OB_ALL
+// | OB_GRP_TEXTOUT
+// | OB_NO_CHECK
+// | OB_RAW,
+//
+// OB_CMD_VERSION = OB_BRIEF
+// | OB_SECTIONS
+// | OB_LONG,
+//
+// OB_CMD_HELP = ~(u64)0,
+//
+// OB_CMD_ARGTEST = ~(u64)0,
+//
+// OB_CMD_TEST = ~(u64)0,
+//
+// OB_CMD_COLORS = OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_ERROR = OB_SECTIONS
+// | OB_NO_HEADER
+// | OB_LONG
+// | OB_BRIEF,
+//
+// OB_CMD_FILETYPE = OB_LONG
+// | OB_NO_HEADER
+// | OB_IGNORE,
+//
+// OB_CMD_FILEATTRIB = OB_NO_HEADER,
+//
+// OB_CMD_BRSUB = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_LONG,
+//
+// OB_CMD_SYMBOLS = OB_NO_HEADER,
+//
+// OB_CMD_FUNCTIONS = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_CALCULATE = 0,
+//
+// OB_CMD_MATRIX = OB_GRP_TRANSFORM
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_FLOAT = OB_ROUND,
+//
+// OB_CMD_VR_CALC = OB_NO_HEADER
+// | OB_BRIEF,
+//
+// OB_CMD_VR_RACE = OB_LONG,
+//
+// OB_CMD_AUTOADD = OB_IGNORE
+// | OB_DEST
+// | OB_DEST2
+// | OB_OVERWRITE
+// | OB_REMOVE_DEST
+// | OB_PRESERVE,
+//
+// OB_CMD_TRACKS = OB_ALL
+// | OB_LONG
+// | OB_PIPE
+// | OB_LOAD_BMG,
+//
+// OB_CMD_SCANCACHE = OB_PURGE,
+//
+// OB_CMD_EXPORT = 0,
+//
+// OB_CMD_CODE = 0,
+//
+// OB_CMD_RECODE = 0,
+//
+// OB_CMD_SUBFILE = OB_GRP_DEST,
+//
+// OB_CMD_LIST = OB_RECURSE
+// | OB_EXT
+// | OB_CUT
+// | OB_ALL
+// | OB_LONG
+// | OB_SORT
+// | OB_NO_HEADER
+// | OB_GRP_CREATE
+// | OB_IGNORE
+// | OB_NORM
+// | OB_LINKS
+// | OB_RM_AIPARAM
+// | OB_SLOT,
+//
+// OB_CMD_LIST_L = OB_CMD_LIST,
+//
+// OB_CMD_LIST_LL = OB_CMD_LIST_L,
+//
+// OB_CMD_LIST_LLL = OB_CMD_LIST_LL,
+//
+// OB_CMD_LIST_A = OB_CMD_LIST_L,
+//
+// OB_CMD_LIST_LA = OB_CMD_LIST_A,
+//
+// OB_CMD_NAME_REF = OB_SORT
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_ILIST = OB_RECURSE
+// | OB_ALL
+// | OB_LONG
+// | OB_SORT
+// | OB_NO_HEADER
+// | OB_GRP_CREATE
+// | OB_IGNORE
+// | OB_NORM
+// | OB_LINKS,
+//
+// OB_CMD_ILIST_L = OB_CMD_ILIST,
+//
+// OB_CMD_ILIST_LL = OB_CMD_ILIST_L,
+//
+// OB_CMD_ILIST_A = OB_CMD_ILIST,
+//
+// OB_CMD_ILIST_LA = OB_CMD_ILIST_A,
+//
+// OB_CMD_MEMORY = OB_RECURSE
+// | OB_EXT
+// | OB_DECODE
+// | OB_MIPMAPS
+// | OB_CUT
+// | OB_ALL
+// | OB_LONG
+// | OB_GRP_CREATE
+// | OB_IGNORE
+// | OB_NORM
+// | OB_LINKS
+// | OB_RM_AIPARAM
+// | OB_SLOT,
+//
+// OB_CMD_MEMORY_A = OB_CMD_MEMORY,
+//
+// OB_CMD_DUMP = OB_GRP_CREATE
+// | OB_IGNORE
+// | OB_NORM
+// | OB_LINKS,
+//
+// OB_CMD_SHA1 = OB_IGNORE
+// | OB_NORM
+// | OB_LINKS
+// | OB_GRP_CREATE
+// | OB_ID
+// | OB_BASE64
+// | OB_DB64
+// | OB_CODING
+// | OB_VERIFY
+// | OB_BRIEF
+// | OB_LONG,
+//
+// OB_CMD_ANALYZE = OB_LONG
+// | OB_IGNORE
+// | OB_GRP_SCRIPT
+// | OB_DEST
+// | OB_DEST2,
+//
+// OB_CMD_DISTRIBUTION = OB_IGNORE
+// | OB_NORM
+// | OB_LINKS
+// | OB_GRP_CREATE
+// | OB_BASE64
+// | OB_DB64
+// | OB_CODING
+// | OB_SOURCE,
+//
+// OB_CMD_DIFF = OB_RECURSE
+// | OB_CUT
+// | OB_ALL
+// | OB_DEST
+// | OB_ESC,
+//
+// OB_CMD_CHECK = OB_NO_CHECK
+// | OB_IGNORE
+// | OB_BRIEF
+// | OB_LONG
+// | OB_GRP_CREATE
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_SLOTS = OB_IGNORE
+// | OB_BRIEF
+// | OB_GRP_CREATE
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_STGI = OB_NO_HEADER
+// | OB_IGNORE,
+//
+// OB_CMD_ISARENA = OB_NO_HEADER
+// | OB_BRIEF
+// | OB_IGNORE,
+//
+// OB_CMD_NORMALIZE = OB_GRP_DEST
+// | OB_REMOVE_SRC
+// | OB_GRP_FFORMAT1
+// | OB_IGNORE
+// | OB_GRP_NORM
+// | OB_FAST
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_PATCH = OB_GRP_DEST
+// | OB_REMOVE_SRC
+// | OB_GRP_FFORMAT1
+// | OB_IGNORE
+// | OB_COMPRESS
+// | OB_GRP_NORM
+// | OB_FAST
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_COPY = OB_CMD_PATCH,
+//
+// OB_CMD_DUPLICATE = OB_GAMEMODES
+// | OB_CMD_PATCH,
+//
+// OB_CMD_MINIMAP = OB_LONG
+// | OB_REMOVE_DEST
+// | OB_PRESERVE
+// | OB_IGNORE
+// | OB_COMPRESS
+// | OB_GRP_NORM
+// | OB_FAST
+// | OB_TOUCH
+// | OB_AUTO
+// | OB_SET_FLAGS
+// | OB_SET_SCALE
+// | OB_SET_ROT
+// | OB_SET_X
+// | OB_SET_Y
+// | OB_SET_Z
+// | OB_XCENTER
+// | OB_YCENTER
+// | OB_ZCENTER
+// | OB_CENTER
+// | OB_GRP_TRANSFORM,
+//
+// OB_CMD_COMPRESS = OB_GRP_DEST
+// | OB_REMOVE_SRC
+// | OB_GRP_FFORMAT1
+// | OB_IGNORE
+// | OB_COMPRESS
+// | OB_GRP_NORM
+// | OB_FAST
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_DECOMPRESS = OB_GRP_DEST
+// | OB_REMOVE_SRC
+// | OB_U8
+// | OB_WU8
+// | OB_IGNORE
+// | OB_GRP_NORM
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_ENCODE = OB_IGNORE_SETUP
+// | OB_GRP_ALIGN
+// | OB_GRP_ENCODE
+// | OB_MIPMAPS
+// | OB_NO_MIPMAPS
+// | OB_N_MIPMAPS
+// | OB_MAX_MIPMAPS
+// | OB_MIPMAP_SIZE
+// | OB_FAST_MIPMAPS
+// | OB_CMPR_DEFAULT
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_CREATE = OB_GRP_DEST
+// | OB_GRP_CREATE
+// | OB_NO_COMPRESS
+// | OB_COMPRESS
+// | OB_FAST
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_UPDATE = OB_SOURCE
+// | OB_IGNORE
+// | OB_GRP_DEST
+// | OB_ESC
+// | OB_NO_COMPRESS
+// | OB_COMPRESS
+// | OB_FAST
+// | OB_RECURSE
+// | OB_ALL
+// | OB_GRP_ENCODE
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_EXTRACT = OB_GRP_DEST
+// | OB_GRP_EXTRACT
+// | OB_IGNORE
+// | OB_ANALYZE
+// | OB_ANALYZE_MODE
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_XDECODE = OB_CMD_EXTRACT,
+//
+// OB_CMD_XEXPORT = OB_CMD_EXTRACT,
+//
+// OB_CMD_XALL = OB_CMD_EXTRACT,
+//
+// OB_CMD_XCOMMON = OB_GRP_DEST
+// | OB_IGNORE,
+//
+// OB_CMD_BINARY = OB_IGNORE
+// | OB_GRP_DEST,
+//
+// OB_CMD_TEXT = OB_IGNORE
+// | OB_DECODE
+// | OB_GRP_TEXTOUT
+// | OB_GRP_BMG
+// | OB_GRP_DEST,
+//
+// OB_CMD_CAT = OB_IGNORE
+// | OB_DECODE
+// | OB_GRP_TEXTOUT
+// | OB_GRP_BMG,
+//
+// OB_CMD_BMG = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_GRP_BMG,
+//
+// OB_CMD_KCL = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_NO_PARAM
+// | OB_NO_CHECK
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_KMP = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_EXPORT
+// | OB_NO_PARAM
+// | OB_NO_CHECK
+// | OB_GRP_TRANSFORM2,
+//
+// OB_CMD_LEX = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_BRIEF
+// | OB_EXPORT,
+//
+// OB_CMD_INFO = OB_IGNORE
+// | OB_NO_HEADER,
+//
+// OB_CMD_GHOST = OB_IGNORE
+// | OB_NO_HEADER
+// | OB_GRP_SCRIPT
+// | OB_DEST
+// | OB_DEST2,
+//
+// OB_CMD_YAZDUMP = OB_GRP_DEST,
+//
+// OB_CMD_VEHICLE = OB_SOURCE
+// | OB_DEST
+// | OB_DEST2
+// | OB_OVERWRITE
+// | OB_BRIEF,
+//
+//} enumOptionsBit;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enum enumCommands ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumCommands
+{
+ CMD__NONE,
+
+ CMD_VERSION,
+ CMD_HELP,
+ CMD_ARGTEST,
+ CMD_TEST,
+ CMD_COLORS,
+ CMD_ERROR,
+ CMD_FILETYPE,
+ CMD_FILEATTRIB,
+ CMD_BRSUB,
+ CMD_SYMBOLS,
+ CMD_FUNCTIONS,
+ CMD_CALCULATE,
+ CMD_MATRIX,
+ CMD_FLOAT,
+ CMD_VR_CALC,
+ CMD_VR_RACE,
+ CMD_AUTOADD,
+ CMD_TRACKS,
+ CMD_SCANCACHE,
+ CMD_EXPORT,
+ CMD_CODE,
+ CMD_RECODE,
+ CMD_SUBFILE,
+
+ CMD_LIST,
+ CMD_LIST_L,
+ CMD_LIST_LL,
+ CMD_LIST_LLL,
+ CMD_LIST_A,
+ CMD_LIST_LA,
+ CMD_NAME_REF,
+
+ CMD_ILIST,
+ CMD_ILIST_L,
+ CMD_ILIST_LL,
+ CMD_ILIST_A,
+ CMD_ILIST_LA,
+
+ CMD_MEMORY,
+ CMD_MEMORY_A,
+ CMD_DUMP,
+
+ CMD_SHA1,
+ CMD_ANALYZE,
+ CMD_DISTRIBUTION,
+
+ CMD_DIFF,
+
+ CMD_CHECK,
+ CMD_SLOTS,
+ CMD_STGI,
+ CMD_ISARENA,
+ CMD_NORMALIZE,
+ CMD_PATCH,
+ CMD_COPY,
+ CMD_DUPLICATE,
+ CMD_MINIMAP,
+ CMD_COMPRESS,
+ CMD_DECOMPRESS,
+ CMD_ENCODE,
+ CMD_CREATE,
+ CMD_UPDATE,
+ CMD_EXTRACT,
+ CMD_XDECODE,
+ CMD_XEXPORT,
+ CMD_XALL,
+ CMD_XCOMMON,
+
+ CMD_BINARY,
+ CMD_TEXT,
+ CMD_CAT,
+ CMD_BMG,
+ CMD_KCL,
+ CMD_KMP,
+ CMD_LEX,
+ CMD_INFO,
+ CMD_GHOST,
+ CMD_YAZDUMP,
+
+ CMD_VEHICLE,
+
+ CMD__N // == 73
+
+} enumCommands;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// enumGetOpt ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+typedef enum enumGetOpt
+{
+ GO_SINGLE_LINE = '1',
+
+ GO__ERR = '?',
+
+ GO_ARENAS = 'A',
+ GO_BRIEF = 'B',
+ GO_COMPRESS = 'C',
+ GO_DEST2 = 'D',
+ GO_ESC = 'E',
+ GO_NO_HEADER = 'H',
+ GO_LOGGING = 'L',
+ GO_MAX_FILE_SIZE = 'M',
+ GO_NO_CHECK = 'N',
+ GO_NO_PARAM = 'P',
+ GO_RECURSE = 'R',
+ GO_SORT = 'S',
+ GO_TRACKS = 'T',
+ GO_VERSION = 'V',
+ GO_EXPORT = 'X',
+
+ GO_ALL = 'a',
+ GO_CONST = 'c',
+ GO_DEST = 'd',
+ GO_EXT = 'e',
+ GO_HELP = 'h',
+ GO_IGNORE = 'i',
+ GO_LONG = 'l',
+ GO_NORM = 'n',
+ GO_OVERWRITE = 'o',
+ GO_PRESERVE = 'p',
+ GO_QUIET = 'q',
+ GO_REMOVE_DEST = 'r',
+ GO_SOURCE = 's',
+ GO_TEST = 't',
+ GO_UPDATE = 'u',
+ GO_VERBOSE = 'v',
+ GO_TRANSFORM = 'x',
+
+ GO_XHELP = 0x80,
+ GO_ALLOW_ALL,
+ GO_COMPATIBLE,
+ GO_WIDTH,
+ GO_DE,
+ GO_COLORS,
+ GO_NO_COLORS,
+ GO_CT_CODE,
+ GO_LE_CODE,
+ GO_CHDIR,
+ GO_TOUCH,
+ GO_AUTO,
+ GO_SET_FLAGS,
+ GO_SET_SCALE,
+ GO_SET_ROT,
+ GO_SET_X,
+ GO_SET_Y,
+ GO_SET_Z,
+ GO_XCENTER,
+ GO_YCENTER,
+ GO_ZCENTER,
+ GO_CENTER,
+ GO_SCALE,
+ GO_SHIFT,
+ GO_XSS,
+ GO_YSS,
+ GO_ZSS,
+ GO_ROT,
+ GO_XROT,
+ GO_YROT,
+ GO_ZROT,
+ GO_YPOS,
+ GO_TRANSLATE,
+ GO_NULL,
+ GO_NEXT,
+ GO_ASCALE,
+ GO_AROT,
+ GO_TFORM_SCRIPT,
+ GO_MINIMAP,
+ GO_RM_GOBJ,
+ GO_BATTLE,
+ GO_EXPORT_FLAGS,
+ GO_ROUTE_OPTIONS,
+ GO_WIM0,
+ GO_SLOT,
+ GO_LOAD_KCL,
+ GO_KCL,
+ GO_KCL_FLAG,
+ GO_KCL_SCRIPT,
+ GO_TRI_AREA,
+ GO_TRI_HEIGHT,
+ GO_FLAG_FILE,
+ GO_XTRIDATA,
+ GO_KMP,
+ GO_SPEED_MOD,
+ GO_KTPT2,
+ GO_TFORM_KMP,
+ GO_REPAIR_XPF,
+ GO_GAMEMODES,
+ GO_MDL,
+ GO_PAT,
+ GO_PATCH_FILE,
+ GO_KMG_LIMIT,
+ GO_KMG_COPY,
+ GO_LT_CLEAR,
+ GO_LT_ONLINE,
+ GO_LT_N_PLAYERS,
+ GO_LT_COND_BIT,
+ GO_LT_GAME_MODE,
+ GO_LT_ENGINE,
+ GO_LT_RANDOM,
+ GO_LEX_PURGE,
+ GO_LOAD_BMG,
+ GO_PATCH_BMG,
+ GO_MACRO_BMG,
+ GO_FILTER_BMG,
+ GO_CACHE,
+ GO_CNAME,
+ GO_ID,
+ GO_BASE64,
+ GO_DB64,
+ GO_CODING,
+ GO_VERIFY,
+ GO_ROUND,
+ GO_PIPE,
+ GO_DELTA,
+ GO_DIFF,
+ GO_EPSILON,
+ GO_BMG_ENCODING,
+ GO_BMG_INF_SIZE,
+ GO_BMG_MID,
+ GO_FORCE_ATTRIB,
+ GO_DEF_ATTRIB,
+ GO_NO_ATTRIB,
+ GO_X_ESCAPES,
+ GO_OLD_ESCAPES,
+ GO_NO_BMG_COLORS,
+ GO_BMG_COLORS,
+ GO_NO_BMG_INLINE,
+ GO_AUTOADD_PATH,
+ GO_STRIP,
+ GO_UTF_8,
+ GO_NO_UTF_8,
+ GO_FORCE,
+ GO_REPAIR_MAGICS,
+ GO_TINY,
+ GO_YAZ0,
+ GO_YAZ1,
+ GO_XYZ,
+ GO_BZ,
+ GO_SH,
+ GO_BASH,
+ GO_JSON,
+ GO_PHP,
+ GO_MAKEDOC,
+ GO_VAR,
+ GO_ARRAY,
+ GO_AVAR,
+ GO_ANALYZE,
+ GO_ANALYZE_MODE,
+ GO_OLD,
+ GO_STD,
+ GO_NEW,
+ GO_EXTRACT,
+ GO_NUMBER,
+ GO_REMOVE_SRC,
+ GO_IGNORE_SETUP,
+ GO_PURGE,
+ GO_ALIGN_U8,
+ GO_ALIGN_PACK,
+ GO_ALIGN_BRRES,
+ GO_ALIGN_BREFF,
+ GO_ALIGN_BREFT,
+ GO_ALIGN,
+ GO_ENCODE_ALL,
+ GO_ENCODE_IMG,
+ GO_NO_ENCODE,
+ GO_NO_RECURSE,
+ GO_AUTO_ADD,
+ GO_NO_ECHO,
+ GO_PT_DIR,
+ GO_RM_AIPARAM,
+ GO_U8,
+ GO_SZS,
+ GO_WU8,
+ GO_XWU8,
+ GO_WBZ,
+ GO_PACK,
+ GO_BRRES,
+ GO_BREFF,
+ GO_BREFT,
+ GO_NO_COMPRESS,
+ GO_FAST,
+ GO_LINKS,
+ GO_BASEDIR,
+ GO_DECODE,
+ GO_MIPMAPS,
+ GO_NO_MIPMAPS,
+ GO_N_MIPMAPS,
+ GO_MAX_MIPMAPS,
+ GO_MIPMAP_SIZE,
+ GO_FAST_MIPMAPS,
+ GO_CMPR_DEFAULT,
+ GO_CUT,
+ GO_RAW,
+ GO_SECTIONS,
+
+} enumGetOpt;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// external vars ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+//extern const InfoOption_t OptionInfo[OPT__N_TOTAL+1];
+//extern const KeywordTab_t CommandTab[];
+//extern const char OptionShort[];
+//extern const struct option OptionLong[];
+//extern u8 OptionUsed[OPT__N_TOTAL+1];
+//extern const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE];
+//UIOPT_INDEX_SIZE := 0x12c = 300
+//extern const InfoCommand_t CommandInfo[CMD__N+1];
+extern const InfoUI_t InfoUI_wszst;
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_WSZST_H
+
diff --git a/project/src/ui/ui.def b/project/src/ui/ui.def
new file mode 100644
index 0000000..85ba906
--- /dev/null
+++ b/project/src/ui/ui.def
@@ -0,0 +1,23034 @@
+
+##
+###############################################################################
+############### Tool 'wszst' ###############
+###############################################################################
+
+#:def_tool( "wszst", \
+ "wszst [option]... command [option|parameter|@file]...", \
+ "Wiimms SZS Tool : List, compare, (de-)compress, extract and create" \
+ " SZS, U8, PACK, BRRES, BREFF, BREFT and RARC archives. It is also a" \
+ " wrapper to all other tools." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wszst VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wszst HELP [--width=wd] OPT|OPTION [option]...\n" \
+ "wszst HELP [--width=wd] CMD|COMMAND ...\n" \
+ "wszst HELP [--width=wd] command ...\n" \
+ "wszst HELP [--width=wd] ...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wszst ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wszst TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wszst COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wszst ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wszst FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wszst FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "BRSUB", "BRSUB", \
+ "wszst BRSUB [file]...", \
+ " If no file is defined, print a table with known BRRES sub files" \
+ " consisting of file format, version, number of sections and warn" \
+ " level. Otherwise analyse the version numbers of each BRRES sub file" \
+ " of each source and print warnings about invalid versions." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wszst SYMBOLS", \
+ "Print predefined symbols of text parser to standard output." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wszst FUNCTIONS [key]...", \
+ "Print a list with all parser functions. If one or more keys entered," \
+ " then only functions that match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wszst CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "MATRIX", "MATRIX", \
+ "wszst MATRIX [patch-option]... [vector]...", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results.", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results. The transformations are done with 4" \
+ " different methods to confirm the algorithms. Only the main results" \
+ " and results, which differ, are printed.\n" \
+ " Normally, the exit status is @OK@ (null). If at least one old" \
+ " transformation returns different results for the different" \
+ " algorithms, then status @DIFFER@ (not null) is returned." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wszst FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "VR_CALC", "VR-CALC|VRCALC", \
+ "wszst VR-CALC delta...", \
+ " Calculate a VR increment for each given delta value" \
+ " (@=VR_winner-VR_loser@). Print results as table." )
+
+#:def_cmd( "VR_RACE", "VR-RACE|VRRACE", \
+ "wszst VR-RACE vr1 vr2...", \
+ "Print a table with VR calculations for a race. Each @VR@ is the" \
+ " current rating of a player. The vr-list is well ordered: The first" \
+ " VR is for the winner and the last VR for the looser. Up to 30 VR" \
+ " values will be accpeted. Each VR can be preceeded by @\"NUM*\"@ to" \
+ " define a repeat factor." )
+
+#:def_cmd( "AUTOADD", "AUTOADD", \
+ "wszst AUTOADD [source]...", \
+ "Manage the auto-add library. Primarily add files to the main auto-add" \
+ " archive for future use of option {--auto-add} or to convert WU8" \
+ " files. If @SOURCE@ is a directory, all standard track and arena file" \
+ " names are searched for the missed auto-add files. Without source" \
+ " files, the status of the auto-add archive is printed.\n" \
+ " Try {wszst AUTOADD ./path_to/Race/Course/} to add all supported" \
+ " files." )
+
+#:def_cmd( "TRACKS", "TRACKS", \
+ "wszst TRACKS [selection_mask]", \
+ "Print a list of all known track SZS files of Mario Kart internal" \
+ " directory './Race/Course'. These files are 32 standard track files" \
+ " and 10 arena files. The first column shows an unique ID of exact 3" \
+ " upper case characters or digits. For '_d' files, a 'd' is appended." \
+ " The second column shows the internal file name. Use BMG files to" \
+ " print real names as third column." )
+
+#:def_cmd( "SCANCACHE", "SCANCACHE", \
+ "wszst SCANCACHE directory\n" \
+ "wszst SCANCACHE --cache directory", \
+ "Scan the cache directory for SZS files and re-build the checksum" \
+ " table. Store the result as file 'cache-content.txt' in the same" \
+ " directory. The file is used by option {--cache} to optimize file" \
+ " access." )
+
+#:def_cmd( "LIST", "LIST|LS", \
+ "wszst LIST [source]...", \
+ "List all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC" \
+ " archives. If listing a directory, then a virtual SZS file is created" \
+ " (like CREATE does it) and listed." )
+
+#:def_cmd( "LIST_L", "LIST-L|LL|LISTL", \
+ "wszst LIST-L [source]...", \
+ "List all sub files with size. 'LIST-L' and 'LL' are short cuts for" \
+ " {LIST --long}." )
+
+#:def_cmd( "LIST_LL", "LIST-LL|LLL|LISTLL", \
+ "wszst LIST-LL [source]...", \
+ "List all sub files with offset and size. 'LIST-LL' and 'LLL' are" \
+ " short cuts for {LIST --long --long}." )
+
+#:def_cmd( "LIST_LLL", "LIST-LLL|LLLL|LISTLLL", \
+ "wszst LIST-LLL [source]...", \
+ "List all sub files with offset and size in debugging mode. 'LIST-LLL'" \
+ " and 'LLLL' are short cuts for {LIST --long --long --long}." )
+
+#:def_cmd( "LIST_A", "LIST-A|LA|LISTA", \
+ "wszst LIST-A [source]...", \
+ "List recursive all sub files with size. 'LIST-A' and 'LA' are short" \
+ " cuts for {LIST --long --all --all}." )
+
+#:def_cmd( "LIST_LA", "LIST-LA|LLA|LISTLA", \
+ "wszst LIST-LA [source]...", \
+ "List recursive all sub files with offset and size. 'LIST-LA' and" \
+ " 'LLA' are short cuts for {LIST --long --long --all --all}." )
+
+#:def_cmd( "NAME_REF", "NAME-REF|NAMEREF", \
+ "wszst NAME-REF [source]...", \
+ "For each BRRES file or subfile, create a name based cross reference" \
+ " and print the result as list ordered by names in BRRES order. For U8" \
+ " archives (e.g. track SZS files), sub file @course_model.brres@ is" \
+ " analysed." )
+
+#:def_cmd( "ILIST", "ILIST|IL", \
+ "wszst ILIST [source]...", \
+ "List the images files of all sub files of SZS, U8, PACK, BRRES," \
+ " BREFF, BREFT and RARC archives; non image files are ignored. If" \
+ " listing a directory, then a virtual SZS file is created (like CREATE" \
+ " does it) and listed." )
+
+#:def_cmd( "ILIST_L", "ILIST-L|ILL|ILISTL", \
+ "wit ILIST-L [source]...", \
+ "List all image files with geometry data. 'ILIST-L' and 'ILL' are" \
+ " short cuts for {ILIST --long}." )
+
+#:def_cmd( "ILIST_LL", "ILIST-LL|ILLL|ILISTLL", \
+ "wit ILIST-LL [source]...", \
+ "List all sub files with advanced geometry data. 'ILIST-LL' and 'ILLL'" \
+ " are short cuts for {ILIST --long --long}." )
+
+#:def_cmd( "ILIST_A", "ILIST-A|ILA", \
+ "wszst ILIST-A [source]...", \
+ "List recursive all image files. 'ILIST-A' and 'ILA' are short cuts" \
+ " for {ILIST --all}." )
+
+#:def_cmd( "ILIST_LA", "ILIST-LA|ILLA|ILISTLA", \
+ "wit ILIST-LA [source]...", \
+ "List recursive all image files with geometry data. 'ILIST-LA' and" \
+ " 'ILLA' are short cuts for {ILIST --long --all}." )
+
+#:def_cmd( "MEMORY", "MEMORY|MEM", \
+ "wszst MEMORY [source]...", \
+ "Dump a memory map of each source file. Virtual images (extracted" \
+ " directories) are also supported." )
+
+#:def_cmd( "MEMORY_A", "MEMORY-A|MEMA", \
+ "wszst MEMORY-A [source]...", \
+ "Dump recursive a memory map of each source file. 'MEMORY-A' and" \
+ " 'MEMA' are short cuts for {MEMORY --all --all}." )
+
+#:def_cmd( "DUMP", "DUMP", \
+ "wszst DUMP [source]...", \
+ "Dump the internal structure of a BRRES files, compressed or not." \
+ " Other archives are ignored. The main goal is to verify string" \
+ " relocation. Virtual images (extracted directories) are also" \
+ " supported." )
+
+#:def_cmd( "SHA1", "SHA1", \
+ "wszst SHA1 [source]...", \
+ "Print a SHA1 checksum for each source. The checksum is calculated by" \
+ " using the uncompressed data." )
+
+#:def_cmd( "ANALYZE", "ANALYZE|ANA|ANALYSE", \
+ "wszst ANALYZE [source]...", \
+ "Analyse track files and print results in machine readable format." )
+
+#:def_cmd( "DISTRIBUTION", "DISTRIBUTION|DIST", \
+ "wszst DISTRIBUTION result source...\n" \
+ "wszst DISTRIBUTION directory [source]...", \
+ "Load each @SOURCE@ (SZS, WBZ, U8 or WU8) and calculate a checksum of" \
+ " the uncompressed data. If @SOURCE@ is a directory, scan it for SZS," \
+ " WBZ, U8 and WU8 files. If a source directory starts with \"arena\"," \
+ " all tracks of the directory are assumed to be battle arenas. Finally" \
+ " print the results into file @RESULT@.\n" \
+ " The default name for @RESULT@ is \"distribution.txt\". Extension" \
+ " .txt is appended to the filename if not defined. If @RESULT@ is a" \
+ " directory, it is used as first source too.\n" \
+ " If file @RESULT@ exists, it is automatically added as last source" \
+ " to the list of option --source, but only if not already added. On" \
+ " scanning of file @result@, parameters are scanned too." )
+
+#:def_cmd( "DIFF", "DIFF|CMP", \
+ "wszst DIFF source1 source2\n" \
+ "wszst DIFF source... --dest dest", \
+ "Compare two or more sources (each SZS, U8, PACK, BRRES, BREFF, BREFT," \
+ " RARC or directory) on file level and report mismatches for each sub" \
+ " file. If option {--dest} is set, then each source file is compared" \
+ " with a file in the destination." )
+
+#:def_cmd( "CHECK", "CHECK", \
+ "wszst CHECK [source]...", \
+ "Make a validity check for track files: Try to read KCL and KMP (and" \
+ " check both) and find unknown, modified, needed and unneeded files." \
+ " Also analyse cannons and make slot proposals. This command uses an" \
+ " internal object and file database. The source can be a SZS, U8, WU8" \
+ " or WBZ file, or an U8 like directory." )
+
+#:def_cmd( "SLOTS", "SLOTS", \
+ "wszst SLOTS [source]...", \
+ "Try to find out the slots, that will run a track. Each source can be" \
+ " a SZS, U8, WU8 or WBZ file, or an U8 like directory. For each source" \
+ " one status line is printed. The status line contains either a" \
+ " positive or a negative slot list, whatever is shorter. For battle" \
+ " arenas, the keyword @ARENA@ is printed." )
+
+#:def_cmd( "STGI", "STGI", \
+ "wszst STGI [source]...", \
+ "Find the first KMP:STGI of each file and print an analysis of it as" \
+ " single line statistic. Additional the number of lap counter check" \
+ " points ('LC') is printed. Track and KMP (binary and text) files are" \
+ " accepted as input." )
+
+#:def_cmd( "ISARENA", "ISARENA", \
+ "wszst ISARENA [source]...", \
+ "Analyse each track for its arena status and print a line with a" \
+ " status code and the track name. The status code is: »-RACE« for a" \
+ " racing track, »?MAYBE« for likely an arena, »+ARENA« for an" \
+ " arena, »+DISPATCH« for an arena with dispatch points or any error" \
+ " hint beginning with an »!«. So the very first character (one of" \
+ " »!-?+«) can be used to distinguish the status class.\n" \
+ " The exit status is >2 on error, 2 (DIFFER), if at least one file is" \
+ " a racing track, or 0 (OK), if all sources are arenas." )
+
+#:def_cmd( "NORMALIZE", "NORMALIZE|NORM", \
+ "wszst NORMALIZE [source]...", \
+ "Normalize an U8 archive, compressed or not: The files are sorted in" \
+ " `Nintendo like' order and unused data holes are removed. If" \
+ " directory '.' is available it becomes the root directory for all" \
+ " others. Compressed sources are compressed again with maximum" \
+ " compression (level 9). The destination is only written if any data" \
+ " changed.\n" \
+ " {wszst NORMALIZE} is the same as {wszst PATCH --norm}." )
+
+#:def_cmd( "PATCH", "PATCH", \
+ "wszst PATCH [source]...", \
+ "Patch an U8 archive, compressed or not: Load the archive, apply all" \
+ " patching and transforming options and store the file again." \
+ " Compressed sources are compressed again. The destination is only" \
+ " written if any data changed." )
+
+#:def_cmd( "COPY", "COPY|CP", \
+ "wszst COPY source dest\n" \
+ "wszst COPY source... [-d|-D] dest", \
+ "COPY is an alternative command for copying and patching files. It" \
+ " uses the same internal procedure as command PATCH, but has another" \
+ " command line syntax.\n" \
+ " The command copies all source files to the destination. If more than" \
+ " 1 source is defined, the destination must be either a directory or a" \
+ " destination filename with escapes. Patching is also possible and" \
+ " option --overwrite is set implicitly." )
+
+#:def_cmd( "DUPLICATE", "DUPLICATE|DUP", \
+ "wszst DUPLICATE source [-d|-D] dest", \
+ "The command reads a single track file and duplicates it several times" \
+ " to DEST. Therefor it analyzes the presence flags combinations with" \
+ " and without extension support and creates one file for each relevant" \
+ " scenario. A LEX section TEST will be inserted to force the execution" \
+ " mode for offline tests.\n" \
+ " The destination filename (not directory part) is searched for the" \
+ " first occurance of @'@@'@. If not found, the place before the last" \
+ " point is used. At this place an identification string is inserted.\n" \
+ " Depending on option {--gamemodes} up to 1573 files will be created." \
+ " So the use of option {--fast} is recommended to speed up the" \
+ " process. Use command {wkmpt GAMEMODES} to list all variants and to" \
+ " check them beforehand." )
+
+#:def_cmd( "MINIMAP", "MINIMAP", \
+ "wszst MINIMAP [source]...", \
+ "Print minimap data (more exact: the visual field of the minimap) of a" \
+ " SZS, U8, BRRES or MDL file. If patching options are used, modify the" \
+ " data and write back the file using its original file format. Only" \
+ " the translation vector is modified and new translation and inverse" \
+ " matrices are calculated." )
+
+#:def_cmd( "COMPRESS", "COMPRESS|COM", \
+ "wszst COMPRESS [source]...", \
+ "Compress and create a SZS archives. If the source is already" \
+ " compressed, then decompress and compress it again. The default" \
+ " destination is @'%P/%N.szs'@." )
+
+#:def_cmd( "DECOMPRESS", "DECOMPRESS|DEC", \
+ "wszst DECOMPRESS [szs]...", \
+ "Decompress SZS files. The default destination is @'%P/%N.u8'@." )
+
+#:def_cmd( "ENCODE", "ENCODE|E", \
+ "wszst ENCODE [source_dir]...", \
+ " Create and/or encode sub files if necessary. It works like command" \
+ " CREATE, but without creating a new first level archive file." )
+
+#:def_cmd( "CREATE", "CREATE|C", \
+ "wszst CREATE [source_dir]...", \
+ "Create SZS, U8, PACK, BRRES, BREFF, BREFT or RARC archives by adding" \
+ " all not hidden files of the directory structure. Create and/or" \
+ " encode sub files if necessary. The default destination is" \
+ " @'%P/%N%T'@." )
+
+#:def_cmd( "UPDATE", "UPDATE|U", \
+ "wszst UPDATE [source]... [--source=] [--dest=]", \
+ "Update an existing SZS, U8, PACK, BRRES, BREFF, BREFT and" \
+ " RARCarchive. This is done in similar way as the {EXTRACT} command," \
+ " but instead of extracting, source files are searched in a prior" \
+ " extracted archive. Only files with the same size are updated. The" \
+ " secondary source is used to find the source sub files. The default" \
+ " secondary source is @'%P/%N.d/'@." )
+
+#:def_cmd( "EXTRACT", "EXTRACT|X", \
+ "wszst EXTRACT [source]...", \
+ "Extract all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC" \
+ " archives. The default destination is @'%P/%N.d/'@." )
+
+#:def_cmd( "XDECODE", "XDECODE|XD", \
+ "wszst XDECODE [source]...", \
+ "Command @XDECODE@ is a short cut for {EXTRACT --decode}. It extract" \
+ " all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC" \
+ " archives and decodes all supported files. The default destination is" \
+ " @'%P/%N.d/'@." )
+
+#:def_cmd( "XEXPORT", "XEXPORT|XX", \
+ "wszst XEXPORT [source]...", \
+ "Command @XEXPORT@ is a short cut for {EXTRACT --decode --export}. It" \
+ " extract all sub files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC" \
+ " archives and decodes all supported files with enabled export mode." \
+ " The default destination is @'%P/%N.d/'@." )
+
+#:def_cmd( "XALL", "XALL|XA", \
+ "wszst XALL [source]...", \
+ "Command @XALL@ is a short cut for {EXTRACT --all}. It extract all sub" \
+ " files of SZS, U8, PACK, BRRES, BREFF, BREFT and RARC archives" \
+ " recursively and decodes all supported files. The default destination" \
+ " is @'%P/%N.d/'@." )
+
+#:def_cmd( "XCOMMON", "XCOMMON", \
+ "wszst XCOMMON [source]...", \
+ "Command @XCOMMON@ is a short cut for {EXTRACT --basedir=common}. Scan" \
+ " archives and extract files from archives, that are below directory" \
+ " @'common'@. The default destination is @'%P/%N.d/'@." )
+
+#:def_cmd( "BINARY", "BINARY|BIN", \
+ "wszst BINARY [source]...", \
+ "Read each source file (binary or text, but never archives) and write" \
+ " the content as binary file. The file extension of the new file" \
+ " depends on the file type, but is usually @.bin@. Currently supported" \
+ " file formats are @BMG@, @GEOHIT@, @ITEMSLOT@, @KCL@, @KMG@, @KMP@," \
+ " @LEX@, @OBJFLOW@, @PAT@ and the related text formats." )
+
+#:def_cmd( "TEXT", "TEXT|TXT", \
+ "wszst TEXT [source]...", \
+ "Read each source file (binary or text, but never archives) and write" \
+ " the content as text file. The file extension of the new file is" \
+ " usually @.txt@. Currently supported file formats are @BMG@," \
+ " @GEOHIT@, @ITEMSLOT@, @KCL@, @KMG@, @KMP@, @LEX@, @OBJFLOW@, @PAT@" \
+ " and the related text formats." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wszst CAT [source/subfile]...", \
+ "Extract one or more sub files of SZS, U8, PACK, BRRES, BREFF, BREFT" \
+ " and RARC archives. The output of all source files is concatenated" \
+ " and written to stdout." )
+
+#:def_cmd( "BMG", "BMG", \
+ "wszst BMG [source]...", \
+ "For each archive all BMG sub files are searched and, if found," \
+ " decoded and printed as combined BMG text file. The command works" \
+ " exactly like {wbmgt MIX}." )
+
+#:def_cmd( "KCL", "KCL", \
+ "wszst KCL [source]...", \
+ "For each archive the KCL sub file @course.kcl@ is searched and, if" \
+ " found, decoded and printed (copied to stdout).\n" \
+ " Automated dropping of bad KCL triangles is enabled if no other drop" \
+ " option is specified by option {--kcl}." )
+
+#:def_cmd( "KMP", "KMP", \
+ "wszst KMP [source]...", \
+ "For each archive the KMP sub file @course.kmp@ is searched and, if" \
+ " found, decoded and printed (copied to stdout)." )
+
+#:def_cmd( "LEX", "LEX", \
+ "wszst LEX [source]...", \
+ "For each archive the LEX sub file @course.lex@ is searched and, if" \
+ " found, decoded and printed (copied to stdout)." )
+
+#:def_cmd( "INFO", "INFO", \
+ "wszst INFO [source]...", \
+ "For each archive a file named @info.txt@ and, if not found," \
+ " @credits.txt@ is searched, ignoring case. The first found file of" \
+ " each archive is printed (copied to stdout)." )
+
+#:def_cmd( "YAZDUMP", "YAZDUMP|YD", \
+ "wszst YAZDUMP [szs]...", \
+ "Analyze YAZ compression print a dump to stdout. Ignore files without" \
+ " YAZ compression." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "Enable LE-CODE and CT-CODE support. The optional parameter is" \
+ " deprecated and ignored." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "TOUCH", "touch", "C", \
+ "", \
+ "Mark the minimap as modified to force a new calculation of the" \
+ " translation and inverse matrices." )
+
+#:def_opt( "AUTO", "auto", "C", \
+ "", \
+ "Calculate the minimap translations automatically by using the minimum" \
+ " and maximum vertex coordinates. The 'scale' and 'rotation' fields" \
+ " are reset. This is done as first action before the SET, CENTER and" \
+ " the other transformations." )
+
+#:def_opt( "SET_FLAGS", "set-flags|setflags", "CP", \
+ "flag", \
+ "Define the flag values (default 0x31f) of the minimap." )
+
+#:def_opt( "SET_SCALE", "set-scale|setscale", "CP", \
+ "vector", \
+ "Define the scale values (default 1.0) of the minimap. The parameter" \
+ " is either a vector expression or a comma separated list of" \
+ " coordinates ('x,z' or 'x,y,z')." )
+
+#:def_opt( "SET_ROT", "set-rot|setrot", "CP", \
+ "vector", \
+ "Define the rotation values (default 0.0) of the minimap. The" \
+ " parameter is either a vector expression or a comma separated list of" \
+ " coordinates ('x,z' or 'x,y,z')." )
+
+#:def_opt( "SET_X", "set-x|setx", "CP", \
+ "v1[,v2]", \
+ "Define 2 values and sort them to define the minimum and maximum" \
+ " x-coordinates of the minimap. If 'v2' is not entered, '-v1' is used" \
+ " as second value." )
+
+#:def_opt( "SET_Y", "set-y|sety", "CP", \
+ "v1[,v2]", \
+ "Define 2 values and sort them to define the minimum and maximum" \
+ " y-coordinates of the minimap. If 'v2' is not entered, '-v1' is used" \
+ " as second value." )
+
+#:def_opt( "SET_Z", "set-z|setz", "CP", \
+ "v1[,v2]", \
+ "Define 2 values and sort them to define the minimum and maximum" \
+ " z-coordinates of the minimap. If 'v2' is not entered, '-v1' is used" \
+ " as second value." )
+
+#:def_opt( "XCENTER", "xcenter", "C", \
+ "", \
+ "Center the minimap in x-direction. This is done after AUTO and SET," \
+ " but before SCALE and SHIFT." )
+
+#:def_opt( "YCENTER", "ycenter", "C", \
+ "", \
+ "Center the minimap in y-direction. This is done after AUTO and SET," \
+ " but before SCALE and SHIFT." )
+
+#:def_opt( "ZCENTER", "zcenter", "C", \
+ "", \
+ "Center the minimap in z-direction. This is done after AUTO and SET," \
+ " but before SCALE and SHIFT." )
+
+#:def_opt( "CENTER", "center", "C", \
+ "", \
+ "Center the minimap in all 3 directions. This is a short cut for" \
+ " {--xcenter --ycenter --zcenter}." )
+
+#:def_opt( "SCALE", "scale", "CP", \
+ "vector[@origin]", \
+ "Transform the data: Scale all coordinates and size values by 'vector'" \
+ " relative to the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Negative values mirror the coordinates. Each parameter is either a" \
+ " vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "SHIFT", "shift", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--translate}, but the addition is done before rotation. The" \
+ " parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XSS", "xss", "CP", \
+ "x1old,x1new,x2old,x2new", \
+ "--xss (x-scale-shift) calculates the X values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "YSS", "yss", "CP", \
+ "y1old,y1new,y2old,y2new", \
+ "--yss (y-scale-shift) calculates the Y values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ZSS", "zss", "CP", \
+ "z1old,z1new,z2old,z2new", \
+ "--zss (z-scale-shift) calculates the Z values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ROT", "rot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes" \
+ " through the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y,z').\n" \
+ " Option --rot is an alternative for {--xrot}, {--yrot} and {--zrot}" \
+ " to define all 3 rotations in one step. Transformations are" \
+ " calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XROT", "xrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('y,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "YROT", "yrot|hrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead. This is" \
+ " a horizontal counterclockwise rotation and the old option name" \
+ " --hrot can also used.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "ZROT", "zrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the z-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "YPOS", "ypos", "CP", \
+ "pos", \
+ "This option defines an Y position for KMP:CKPT transformations. It" \
+ " has only impact to X and Z rotations (Options {--xrot} and" \
+ " {--zrot}). If not set, the mean y of the active rotation origins are" \
+ " used." )
+
+#:def_opt( "TRANSLATE", "translate|trans", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--shift}, but the addition is done after rotation. The parameter is" \
+ " either a vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z'). @--trans@ is a short cut.\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "NULL", "null", "C", \
+ "", \
+ "Create a neutral transformation without affecting the coordinates." \
+ " The only influence is, that the dependent values (like maximum) are" \
+ " re-calculated as if a transformation has taken place." )
+
+#:def_opt( "NEXT", "next", "C", \
+ "", \
+ "Close the current transformation step with all scaling, shifting," \
+ " rotation and translation options and open a new step with cleared" \
+ " options. On transformation each step is logical done one by one. In" \
+ " real, one total transformation matrix is calculated and used for" \
+ " fast transformations.\n" \
+ " If option --next is used, the ability for modifying the scale and" \
+ " rotation vectors (not the positions) of different KMP sections is" \
+ " nearly always lost. A warning is printed if this occurs." )
+
+#:def_opt( "ASCALE", "ascale", "CP", \
+ "factor@dir", \
+ "Transform the data and do an axis scale: Close the current" \
+ " transformation step like {--next} and scale the data by @'factor'@" \
+ " into the direction given by the vector @'dir'@. Store the resulting" \
+ " matrix as single transformation step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "AROT", "arot", "CP", \
+ "degree[@pos1]@pos2", \
+ "Transform the data and do an axis rotation: Close the current" \
+ " transformation step like {--next} and rotate the data by @'degree'@" \
+ " around the axis defined by the 2 points. If @'pos1'@ is not set, use" \
+ " @0,0,0@ instead. Store the resulting matrix as single transformation" \
+ " step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "TFORM_SCRIPT", "tform-script|tformscript", "CP", \
+ "script", \
+ "Load the script and execute it by the text parser.\n" \
+ " Then for each coordinate (2D and 3D), call the macro @TRANSFORM@" \
+ " after all other transformations. Call it without parameters and set" \
+ " variable @$$I@ with a zero based index of all vertices, variable" \
+ " @$$D@ to the dimension (2 or 3) and the variable @$$P@ to the vector" \
+ " of the current vertex. If the macro returns a vector, it is the new" \
+ " position.\n" \
+ " For each file, macro @BEGIN@ is called at the beginning and @END@" \
+ " after processing all points, but only, if the macros are defined." \
+ " For @END@, variable @$$I@ is set to the number of processed vertices" \
+ " in the current file.\n" \
+ " Before each macro call, the private and local variables are cleared" \
+ " and only global parameters are permanent. The zero based index is" \
+ " cleared for each new source. The parameters of the macro calls are" \
+ " defined in the local name space." )
+
+#:def_opt( "MINIMAP", "minimap", "C", \
+ "", \
+ "Fix the minimap position in the same way as {wszst MINIMAP --auto}." \
+ " All other minimap related options are ignored for the minimap" \
+ " processing." )
+
+#:def_opt( "RM_GOBJ", "rm-gobj|rmgobj", "CP", \
+ "objlist", \
+ "Remove objects from the KMP section @GOBJ@. Therefor a comma" \
+ " separated object list with single values like @'a'@ or ranges like" \
+ " @'a:b'@ is expected. @'a'@ and @'b'@ are numbers, object names" \
+ " (prefixed by 'o$$') or any other parser expressions." )
+
+#:def_opt( "BATTLE", "battle", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used.\n" \
+ " If mode is @ON@, assume a battle arena and enable a spüecial" \
+ " battle support. If mode is @OFF@, disable special battle arena" \
+ " support. If mode is @AUTO@, analyse the KMP and estimate, if it is a" \
+ " battle areana. Modes @ON@ and @OFF@ override KMP parameter" \
+ " @BATTLE-MODE@." )
+
+#:def_opt( "EXPORT_FLAGS", "export-flags|exportflags|exflags", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used. --exflags is an alternative name for the option.\n" \
+ " If mode is @ON@, this feature is forced: On creating a KMP text" \
+ " file, the option @EXPORT-FLAGS@ is always set to 1. On creating a" \
+ " binary KMP file, the flags are always exported as lowest byte of the" \
+ " scale factors or x-rotation.\n" \
+ " If mode is @OFF@, this feature is totally disabled. If mode is not" \
+ " @AUTO@, KMP parameter @EXPORT-FLAGS@ is overridden." )
+
+#:def_opt( "ROUTE_OPTIONS", "route-options|routeoptions|ropt", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used.\n" \
+ " On mode @ON@, the new commands @$$PREV@ and @$$NEXT@ are printed" \
+ " for each group of KMP sections ENPT and ITPT. On mode @AUTO@, the" \
+ " command is only printed, if any option is set or if parameter" \
+ " @SHOW-OPTIONS@ is >0. On mode @OFF@, this feature is totally" \
+ " disabled to create KMP text files that are compatible with versions" \
+ " <1.60a.\n" \
+ " This option exists only for a transition period. Its behaviour will" \
+ " be changed in the future. @--ropt@ is a short cut." )
+
+#:def_opt( "WIM0", "wim0", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used.\n" \
+ " If mode is @ON@, a KMP section called WIM0 is added on binary KMP" \
+ " creation. The sections contains information for Wiimms tools.\n" \
+ " If mode is @OFF@, this feature is totally disabled. If mode is not" \
+ " @AUTO@, KMP parameter @KMP-WIM0@ is overridden." )
+
+#:def_opt( "SLOT", "slot", "CP", \
+ "keyword", \
+ "Patch a track file to run at the specified slot. KMP and KCL may be" \
+ " modified. BRRES files may be added to or removed from SZS. The main" \
+ " keywords are @DAISY, DESERT, SHERBET, SHYGUY, STANDARD@ and @MOST@." \
+ " Slot numbers (except '42' and '4.2') and different other track names" \
+ " are also accepted. For some conversions, the auto-add library is" \
+ " needed." )
+
+#:def_opt( "LOAD_KCL", "load-kcl|loadkcl", "GP", \
+ "file", \
+ "Load a KCL or OBJ file for reference issues." )
+
+#:def_opt( "KCL", "kcl", "GP", \
+ "list", \
+ "Set global options for KCL processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. Keywords @SMALL, MEDIUM@ and @CHARY@ select the default" \
+ " parameters for the octree creation. The other allowed keywords are:" \
+ " @FAST, NEW, CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP," \
+ " G, USEMTL, CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED," \
+ " DROP-FIXED, DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL," \
+ " CONV-FACEUP, WEAK-WALLS, SORT, INPLACE, SILENT@ and @LOG@." )
+
+#:def_opt( "KCL_FLAG", "kcl-flag|kclflag", "CP", \
+ "joblist", \
+ "Modify the KCL flag of KCL files. A comma separated job list in the" \
+ " format @'srclist=dest'@ is expected. @'srclist'@ is a plus sign" \
+ " separated list with single values like @<val>@, @T<type>@ and" \
+ " @<val>/<mask>@ or ranges like @<val>:<val>@, @T<type>:<type>@ and" \
+ " @<val>:<val>/<mask>@. @'<val>'@ is a complete KCL flag in the range" \
+ " of @0..0xffff@. @'<type>'@ are only the base types in the range of" \
+ " @0..0x1f@. If @<mask>@ is present, it marks the relevant bits. For" \
+ " the @T<type>@ variant, the mask is set to @0x1f@.\n" \
+ " All KCL flags of the source list are assigned to the new value" \
+ " @'dest'@, but only the set bits of @'<mask>'@ are modified. A later" \
+ " definition overrides the previous one." )
+
+#:def_opt( "KCL_SCRIPT", "kcl-script|kclscript", "CP", \
+ "script", \
+ "After reading a KCL source file and executing all transformations," \
+ " the text file @'script'@ is executed by the internal text parser." \
+ " The script should use the parser functions @tri$$*()@ to read and" \
+ " modify the triangle positions and flags, or to add or remove" \
+ " complete triangles.\n" \
+ " If this option is used multiple times, each script is executed in" \
+ " the entered order." )
+
+#:def_opt( "TRI_AREA", "tri-area|triarea", "GP", \
+ "EXPR", \
+ "Define the minimal area size of KCL triangles. The intention is to" \
+ " ignore triangles that are generally to small. @EXPR@ is a floating" \
+ " point number or expression. Triangles are invalidated if their area" \
+ " size is smaller than @EXPR@. The test is executed after reading" \
+ " files, after transformations, and after calculating normals and" \
+ " lengths. Values between 0.01 and 4.0 are recommended. The careful" \
+ " value 1.0 is used as default. Value 0 disables this filter" \
+ " functionality." )
+
+#:def_opt( "TRI_HEIGHT", "tri-height|triheight|tri-ht|triht", "GP", \
+ "EXPR", \
+ "Define the minimal height of KCL triangles. The intention is to" \
+ " ignore deformed triangles (very slim, but long). @EXPR@ is a" \
+ " floating point number or expression. Triangles are invalidated if at" \
+ " least 1 of the 3 heights is smaller than @EXPR@. The test is" \
+ " executed after reading files, after transformations, and after" \
+ " calculating normals and lengths. Values between 0.01 and 2.0 are" \
+ " recommended. The careful value 1.0 is used as default. Value 0" \
+ " disables this filter functionality.\n" \
+ " --tri-ht is an alternative name for the option." )
+
+#:def_opt( "FLAG_FILE", "flag-file|flagfile", "CP", \
+ "filename", \
+ "Define a flag file if scanning an OBJ file (KCL processing). The file" \
+ " name may contain %-escapes. Set it to an empty string to disable" \
+ " flag files at all.\n" \
+ " The tool search the flag file in the following order until found:" \
+ " File defined by --flag-file; OBJ file name with replaced extension" \
+ " ('a.obj' becomes 'a.flag'); OBJ file name with appended extension" \
+ " ('a.obj' becomes 'a.obj.flag')." )
+
+#:def_opt( "KMP", "kmp", "GP", \
+ "list", \
+ "Set global options for KMP processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. The other allowed keywords are: @FORCE, NEW, RM-SPCITEM, LEFT," \
+ " RIGHT, WIDE, NARROW, FIX-CKPH, FIX-ENPH, FIX-ITPH, FIX-PH," \
+ " FIX-CKNEXT, FIX-CKJGPT, FIX-CK, FIX-ALL, MASK-PFLAGS, RM-LECODE," \
+ " PURGE-GOBJ, FULL-DEFOBJ, DUMP-CLASS, DUMP-ONEWAY, DUMP-ALL, 1LAP ..." \
+ " 9LAPS, MAX-LAPS, RM-EMPTY, INPLACE, SILENT@ and @LOG@." )
+
+#:def_opt( "SPEED_MOD", "speed-mod|speedmod", "GP", \
+ "factor", \
+ "The speed modifier is a user extensions to change the basic speed of" \
+ " all vehicles. The speed factor itself is stored into KMP:STGI" \
+ " section of a track.\n" \
+ " If --speed-mod is set to a value >0.0, then the last 2 bytes of" \
+ " the STGI section are patched. The value 0.0 reset these 2 bytes and" \
+ " deactivates the speed modifier." )
+
+#:def_opt( "KTPT2", "ktpt2", "GP", \
+ "vector", \
+ "Insert or replace a second KTPT. Use VECTOR as new position. VECTOR" \
+ " is either @X,Z@ or @X,Y,Z@ or an expression. Set Y to 0 for an" \
+ " automatic defined height.\n" \
+ " If the first 4 characters of VECTOR are 'AUTO' (ignoring case)," \
+ " then the position is calculated automatically and set to the" \
+ " recommendation of command @wkmpt KTPT@.\n" \
+ " The tool looks for the nearest lap counter (CKPT with mode 0) and" \
+ " adjust the KTPT: The direction of the lap counter is copied and the" \
+ " KTPT is moved to the lap counter line using the new direction.\n" \
+ " LE-CODE uses the second KTPT to draw the finish line at another" \
+ " place away from the start position." )
+
+#:def_opt( "TFORM_KMP", "tform-kmp|tformkmp|tkmp", "GP", \
+ "list", \
+ "Select KMP sections and objects for a transformation. @--tkmp@ is a" \
+ " short cut. The option expects a comma separated list of keywords." \
+ " Non ambiguous of keywords are allowed and minus signs within" \
+ " keywords are optional (e.g. @GOBJS@). A minus sign before a keyword" \
+ " disables transformation of the related section or object.\n" \
+ " Sections are selected by the KMP section names @AREA, CAME, CKPT," \
+ " CNPT, ENPT, GOBJ, ITPT, JGPT, KTPT, MSPT@ and @POTI@.\n" \
+ " Objects are selected by the keywords @AREA-POSITION, AREA-ROTATE," \
+ " AREA-SCALE, CAME-POSITION, CKPT-POSITION, CNPT-POSITION," \
+ " CNPT-ROTATE, ENPT-POSITION, ENPT-SCALE, GOBJ-POSITION, GOBJ-ROTATE," \
+ " GOBJ-SCALE, ITPT-POSITION, ITPT-SCALE, JGPT-POSITION, JGPT-ROTATE," \
+ " KTPT-POSITION, KTPT-ROTATE, MSPT-POSITION, MSPT-ROTATE@ and" \
+ " @POTI-POSITION@.\n" \
+ " The keywords @NONE@ and @ALL@ (default) complete the field." )
+
+#:def_opt( "REPAIR_XPF", "repair-xpflags|repairxpflags|repxpf", "CP", \
+ "file", \
+ "Load a KMP file and use it to repair the settings of the extended" \
+ " presence flags, if they are destroyed by another KMP tool." \
+ " @--repxpf@ is a short cut for this option." )
+
+#:def_opt( "GAMEMODES", "gamemodes|gmodes", "CP", \
+ "list", \
+ "Filter the list of combinations. The parameter is a comma separated" \
+ " list of keywords: @AUTO@: Add a automatic mode without conditions" \
+ " first. @STANDARD@ (or @STD@): Add standard modes. @1STANDARD@ (or" \
+ " @1STD@): Add standard modes first. @BALLOON@: Add balloon battle" \
+ " modes. @COIN@: Add coin runners modes. @BATTLE@: Short cut for" \
+ " 'BALLOON,COIN'. @VERSUS@ (or @VS@): Add versus modes. @ITEMRAIN@:" \
+ " Add itemrain modes. @RACE@: Short cut for 'VERSUS,ITEMRAIN'. @ALL@" \
+ " (default): Short cut for 'STANDARD,BATTLE,RACE'. @NO-MODES@: Exclude" \
+ " 'ALL' and create auto modes only. @ENGINE@: Include engine classes" \
+ " (default). @NO-ENGINE@: Exclude engine classes. @RANDOM@: Include" \
+ " random modes (default). @NO-RANDOM@: Exclude random modes." \
+ " @OFFLINE@: Filter offline modes. @ONLINE@: Filter online modes." \
+ " @NO-TT@: Exclude time trial. @TT@: Force a time trial scenario, even" \
+ " if it is a duplicate. @FULL@: Don't eliminate duplicates from list" \
+ " (up to 1573 modes). @NSORT@: Sort the list by name. @ISORT@: Sort" \
+ " the list by index. @DEBUG@: Print a debug info about this option." )
+
+#:def_opt( "MDL", "mdl", "GP", \
+ "list", \
+ "Set global options for MDL processing. To enable MDL patching, use" \
+ " option {--patch-file} and select BRRES files for patching.\n" \
+ " Parameter @'list'@ is a comma separated list of keywords. A minus" \
+ " sign before a keyword disables a setting. Each occurrence of the" \
+ " option will only change entered settings and all other settings are" \
+ " untouched.\n" \
+ " A MDL transformation (controlled by the transformation options) is" \
+ " only done, if at least one of the keywords @VECTOR@ or @VERTEX@ is" \
+ " set.\n" \
+ " Keyword @DEFAULT@ resets the default settings (@VERTEX@) and" \
+ " @CLEAR@ disables all. The other allowed keywords are: @VECTOR," \
+ " MATRIX, VERTEX, PARENT, CHILD@ and @LOG@." )
+
+#:def_opt( "PAT", "pat", "GP", \
+ "list", \
+ "Set global options for PAT processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. The other allowed keywords are: @AUTO, SIMPLE, COMPLEX, BOTH," \
+ " SILENT@ and @LOG@." )
+
+#:def_opt( "PATCH_FILE", "patch-file|patchfile|pfile", "GP", \
+ "list", \
+ "Define, which kind of KMP, KCL and BRRES/MDL files are objects for" \
+ " patching. @--pfile@ is a short cut.\n" \
+ " Parameter @'list'@ is a comma separated list of keywords. A minus" \
+ " sign before a keyword disables a setting. Each occurrence of the" \
+ " option will only change entered settings and all other settings are" \
+ " untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings (@TRACK,LOG@) and" \
+ " @CLEAR@ disables all. The other allowed keywords are: @KMP, KCL," \
+ " OTHER-KCL, ALL-KCL, MODEL, MAP, VRCORN, OTHER-BRRES, ALL-BRRES," \
+ " TRACK (=KMP,KCL,MODEL,MAP,VRCORN), ALL, LOG@ and @LOG-ALL@." )
+
+#:def_opt( "KMG_LIMIT", "kmg-limit|kmglimit", "GP", \
+ "seconds", \
+ "Limit the run time for Ballon Battle and Coin Runners to the given" \
+ " time in SECONDS. Smaller values are not changed. The limitation is" \
+ " carried out after loading a binary file and before scanning a text" \
+ " file. Value 0 disables this option." )
+
+#:def_opt( "KMG_COPY", "kmg-copy|kmgcopy", "GP", \
+ "id", \
+ "Make all 10 slots of a KMG file equal after loading a binary file and" \
+ " before scanning a text file. ID is either a slot index (0..9) or a" \
+ " slot name (A11..A25) and declares the source slot. Value -1 disables" \
+ " this option. If ID contains brackets [...], then it is analysed as" \
+ " an arena name and the part between the brackets is searched for" \
+ " attributes A11..A25." )
+
+#:def_opt( "LT_CLEAR", "lt-clear|ltclear", "G", \
+ "", \
+ "Clear the LEX/TEST section and remove the section and course.lex if" \
+ " empty. This option is executed before all other --lt-* options." )
+
+#:def_opt( "LT_ONLINE", "lt-online|ltonline", "GP", \
+ "mode", \
+ "Set LEX/TEST parameter OFFLINE-ONLINE to this MODE. MODE is one of" \
+ " @AUTO@ (default), @NEVER@ or @ALWAYS@. Only track.szs files are" \
+ " modified. If needed, file course.lex and section TEST are created or" \
+ " removed if empty." )
+
+#:def_opt( "LT_N_PLAYERS", "lt-n-players|lt-nplayers|ltnplayers", "GP", \
+ "offline,online", \
+ "Set LEX/TEST parameters N-OFFLINE and N-ONLINE to these integer" \
+ " values. Only track.szs files are modified. If needed, file" \
+ " course.lex and section TEST are created or removed if empty." )
+
+#:def_opt( "LT_COND_BIT", "lt-cond-bit|lt-condbit|ltcondbit", "GP", \
+ "bitnum", \
+ "Set LEX/TEST parameter COND-BIT to this integer value. Use -1 to" \
+ " deactivate this COND-BIT. Only track.szs files are modified. If" \
+ " needed, file course.lex and section TEST are created or removed if" \
+ " empty." )
+
+#:def_opt( "LT_GAME_MODE", "lt-game-mode|lt-gamemode|ltgamemode", "GP", \
+ "mode", \
+ "Set LEX/TEST parameter GAME-MODE to this MODE. MODE is one of @AUTO@" \
+ " (default), @BALLOON, COIN, VERSUS@ or @ITEMRAIN@. Only track.szs" \
+ " files are modified. If needed, file course.lex and section TEST are" \
+ " created or removed if empty." )
+
+#:def_opt( "LT_ENGINE", "lt-engine|ltengine", "GP", \
+ "mode", \
+ "Set LEX/TEST parameter ENGINE to this MODE. MODE is one of @AUTO@" \
+ " (default), @BATTLE, 50CC, 100CC, 150CC, 200CC, 150M@ or @200M@. Only" \
+ " track.szs files are modified. If needed, file course.lex and section" \
+ " TEST are created or removed if empty." )
+
+#:def_opt( "LT_RANDOM", "lt-random|ltrandom", "GP", \
+ "index", \
+ "Force a random scenario, if between 1 and 8. Value 0 enables auto" \
+ " selection and -1 disables this option. Only track.szs files are" \
+ " modified. If needed, file course.lex and section TEST are created or" \
+ " removed if empty." )
+
+#:def_opt( "LEX_PURGE", "lex-purge|lexpurge", "G", \
+ "", \
+ "Delete LEX sections without any impact. Delete sub-file course.lex if" \
+ " it no longer contains a section. This option is executed after all" \
+ " --lt-* options." )
+
+#:def_opt( "LOAD_BMG", "load-bmg|loadbmg", "CMP", \
+ "file", \
+ "Load immediately the file to fill an internal message pool. The" \
+ " option can be used multiple times to fill the message pool by" \
+ " different sources. A later message overrides the previous message.\n" \
+ " The internal message pool is patched by all {--patch-bmg} options." )
+
+#:def_opt( "PATCH_BMG", "patch-bmg|patchbmg|pb", "CMP", \
+ "mode[cond][=param]", \
+ "This option specifies a BMG patch mode. Some of the modes need a" \
+ " parameter or a file name of a BMG patch file (raw or text BMG), both" \
+ " separated by an equal sign. Modes with required file names are" \
+ " @PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL@ and" \
+ " @NOTEQUAL@. Modes with text parameter are @FORMAT@, @REGEXP@ and" \
+ " @RM-REGEXP@. Standalone modes are @ID, ID-ALL, UNICODE, RM-ESCAPES," \
+ " RM-CUPS, CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY," \
+ " LE-FILL, X-COPY, X-FORCE-COPY@ and @X-FILL@. Unique abbreviations" \
+ " are allowed.\n" \
+ " The optional condition @COND@ is either '@?MID@' or '@!MID@'. In" \
+ " case of '@?MID@', the patch is only applied if the message id MID" \
+ " already exists. In case of '@!MID@', the patch is only applied if" \
+ " the message id MID does not exists.\n" \
+ " If this option is used multiple times, all patch files will be" \
+ " processed in the entered order." )
+
+#:def_opt( "MACRO_BMG", "macro-bmg|macrobmg|mb", "CMP", \
+ "file", \
+ "Load a BMG file and add the messages to the macro library; already" \
+ " existing entries are replaced. The macro library is accessed by" \
+ " escape sequence @\\m{{MID}@ as fallback, if the active file has not" \
+ " already defined the message @MID@ by itself." )
+
+#:def_opt( "FILTER_BMG", "filter-bmg|filterbmg|fb|msg", "CMP", \
+ "list", \
+ "If this option is set, the BMG messages are filtered by this list." \
+ " Only enabled messages are exported to the output BMG file (binary or" \
+ " text).\n" \
+ " The parameter is a list of message ids (short MID, 'Txx' or 'Uxx'" \
+ " or Mxx' or hex number) or message ranges (MID:MID) or one of the" \
+ " keywords @NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT," \
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE)," \
+ " LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS," \
+ " XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS," \
+ " GENERIC@ or @ALL@. If an element is preceded by a minus sign, it is" \
+ " removed from the filter list (disabled).\n" \
+ " With v2.01a, this option was renamed from --msg to the more" \
+ " meaningful name --filter-bmg. The old name is still available." )
+
+#:def_opt( "CACHE", "cache", "GP", \
+ "dir", \
+ "Define a directory for a SZS cache.If creating a YAZ0 compressed file" \
+ " with standard compression (level 9), the cache is searched for the" \
+ " compressed version. File cache-content.txt is used as file list with" \
+ " hash values. If the cache file is not found or the content differ," \
+ " the file is (re-)created and exit status 2=differ is returned.\n" \
+ " Background: Loading a compressed SZS and content verification is" \
+ " much faster than YAZ compression.\n" \
+ " For legay reasons: If parameter DIR is a file, it is split into" \
+ " directory and base name. The directory is used for the cache" \
+ " directory and the base name for option {--cname}, but only if" \
+ " {--cname} is not used." )
+
+#:def_opt( "CNAME", "cname", "GP", \
+ "name", \
+ "Name of the first cache file. This parameter overrides the generated" \
+ " cache name. The name is used only once for the very first cache" \
+ " candidate." )
+
+#:def_opt( "ID", "id", "C", \
+ "", \
+ "Print an ID with 8 characters instead of a SHA-1 sum with 40" \
+ " characters. The SHA-1 sum is used to calculate the ID. The ID" \
+ " consists of '0'-'9' and 'a'-'w' (32 characters)." )
+
+#:def_opt( "BASE64", "base64", "CO", \
+ "[=mode]", \
+ "Encode the the checksum string as BASE64 with 27 characters instead" \
+ " of hex. If a parameter is set, it acts like {--coding=mode}." )
+
+#:def_opt( "DB64", "db64", "CO", \
+ "[=mode]", \
+ "Encode the the checksum string and some length as BASE64 with 32" \
+ " characters instead of hex for database searches. This options" \
+ " implies {--coding=URL} if no other coding is defined. If a parameter" \
+ " is set, it acts like {--coding=mode}. Option {--db64} has priority" \
+ " over {--base64}." )
+
+#:def_opt( "CODING", "coding", "CP", \
+ "mode", \
+ "Define the coding of the non alphanumeric characters for BASE64:" \
+ " STANDART (+/=, default), URL (-_=), STAR (-_*) or XML (.-*)." )
+
+#:def_opt( "VERIFY", "verify", "C", \
+ "", \
+ "Calculate the checksum and compare the filename and return exit" \
+ " status (0=valid, 2=differ). The result is valid, if the checksum is" \
+ " found with a leading and a following point or minus sign. If" \
+ " {--quiet} is set, error messages are suppressed." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print in long format. Multiple usage possible." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress printing of header and footer." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Suppress information lines in decoded text files. This includes" \
+ " syntax information ({--no-header}). If set twice, the output of" \
+ " unneeded sections is also suppressed." )
+
+#:def_opt( "PIPE", "pipe", "CM", \
+ "", \
+ "Use pipe sign instead of spaces to separate columns." )
+
+#:def_opt( "DELTA", "delta", "C", \
+ "", \
+ "Print only modified records or sections on text output. Supported" \
+ " file formats until now: @GEOHIT@, @ITEMSLOT@, @KMG@ and @OBJFLOW@." \
+ " If set twice, limit output to modified records (only relevant for" \
+ " @ITEMSLOT@)." )
+
+#:def_opt( "DIFF", "diff", "C", \
+ "", \
+ "On text output, print only differences from original files. It's a" \
+ " short cut for --no-header --brief --brief --delta --delta." \
+ " Additional, the output is limited to data sections." )
+
+#:def_opt( "BMG_ENCODING", "bmg-encoding|bmgencoding", "CP", \
+ "name", \
+ "Force a BMG encoding for new BMG files. Accepted encoding names are:" \
+ " @CP-1252@, @UTF-16BE@ (or @UTF-16@), @SHIFT-JIS@, @UTF-8@ and @AUTO@" \
+ " for automatic detection (default). Same keywords without minus signs" \
+ " are accepted too.\n" \
+ " Mario Kart Wii uses encoding @UTF-16BE@; the default if no other" \
+ " encoding is defined." )
+
+#:def_opt( "BMG_INF_SIZE", "bmg-inf-size|bmginfsize", "CP", \
+ "size", \
+ "Defines the 'INF1' size of new BMG files between 4 and 1000. The" \
+ " first 4 bytes of a INF1 record is an offset into the string pool and" \
+ " the remaining bytes the attributes. Maximal 40 attribute bytes are" \
+ " supported and additional bytes are assumed to be NULL. All BMG files" \
+ " of MKW have a size of 8." )
+
+#:def_opt( "BMG_MID", "bmg-mid|bmgmid", "CO", \
+ "[mode]", \
+ "Control the creation of BMG section @MID1@. Suppress the creation, if" \
+ " mode is @OFF@. Force the creation, if mode is @ON@. On mode @AUTO@" \
+ " (default), the source is analysed for the decision." )
+
+#:def_opt( "FORCE_ATTRIB", "force-attrib|forceattrib", "CP", \
+ "attrib", \
+ "Forces, that all attributes are set to this vector." )
+
+#:def_opt( "DEF_ATTRIB", "def-attrib|defattrib", "CP", \
+ "attrib", \
+ "Define the default attributes for BMG files. If not set, the default" \
+ " attributes are estimated. On text output, strings with default" \
+ " attributes are printed without attribute vector. The usual default" \
+ " attribute for MKW is @[1]@." )
+
+#:def_opt( "NO_ATTRIB", "no-attrib|noattrib", "C", \
+ "", \
+ "Suppress the output of any BMG attributes if creating BMG text files." )
+
+#:def_opt( "X_ESCAPES", "x-escapes|xescapes", "C", \
+ "", \
+ "Use \\x{{} escapes instead of \\z{{} escapes." )
+
+#:def_opt( "OLD_ESCAPES", "old-escapes|oldescapes", "C", \
+ "", \
+ "To be compatible with v1.43 and earlier, print 1A escape sequences" \
+ " with total size of >12 bytes as single words using \\x{{}. Also" \
+ " don't use \\x{{} and \\u{{} with parameter lists." )
+
+#:def_opt( "SINGLE_LINE", "1|single-line|singleline", "C", \
+ "", \
+ "If set, don't print continuation lines for BMG text output. If set" \
+ " twice, print only single text lines and suppress attributes like" \
+ " option {--no-attrib} does it." )
+
+#:def_opt( "NO_BMG_COLORS", "no-bmg-colors|nobmgcolors", "C", \
+ "", \
+ "If set, suppress the output of '\\c{{color}' escape sequences for" \
+ " colors definitions in BMG text output to be compatible with old" \
+ " versions of the tools." )
+
+#:def_opt( "BMG_COLORS", "bmg-colors|bmgcolors", "C", \
+ "", \
+ "Force output of '\\c{{color}' escape sequences with names, even for" \
+ " foreign (not MKWii) BMG files." )
+
+#:def_opt( "NO_BMG_INLINE", "no-bmg-inline|nobmginline", "C", \
+ "", \
+ "Print BMG attributes as separate line before the message definition" \
+ " to be compatible with versions until v1.39. The output for the" \
+ " standard value 0x01000000 is always suppressed. This was the default" \
+ " until v1.43." )
+
+#:def_opt( "EXPORT", "X|export", "C", \
+ "", \
+ "Enable the export mode and create small and machine readable text" \
+ " files for easy post processing. The option works similar like @-HBB@" \
+ " for KMP and like @-HBl1@ for BMG text files." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "SORT", "S|sort", "CP", \
+ "mode", \
+ "Define a sort mode. Allowed keywords are: @NONE@ (default), @NAME," \
+ " OFFSET, U8, PACK, BRRES, BREFT@ and @AUTO@" )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TRACKS", "T|tracks", "GP", \
+ "tracks", \
+ "Define a new track order. A comma separated list in the format" \
+ " @[a=]b@ or @a:=b@ is expected. @'a'@ and @'b'@ are track names or" \
+ " slot numbers. @'a'@ is the destination slot and @'b'@ the assigned" \
+ " track. If @'a'@ is omitted, the next slot is used; this means" \
+ " @[a=]b,c,d@ is possible.\n" \
+ " Tracks will only be exchanged so that always all tracks are" \
+ " assigned. But if using @':='@ the new slots are assigned without" \
+ " exchanging and the old values are lost." )
+
+#:def_opt( "ARENAS", "A|arenas", "GP", \
+ "arenas", \
+ "Define a new arena order. A comma separated list in the format" \
+ " @[a=]b@ or @a:=b@ is expected. @'a'@ and @'b'@ are arena names or" \
+ " slot numbers. @'a'@ is the destination slot and @'b'@ the assigned" \
+ " arena. If @'a'@ is omitted, the next slot is used; this means" \
+ " @[a=]b,c,d@ is possible.\n" \
+ " Arenas will only be exchanged so that always all arenas are" \
+ " assigned. But if using @':='@ the new slots are assigned without" \
+ " exchanging and the old values are lost." )
+
+#:def_opt( "AUTOADD_PATH", "autoadd-path|autoaddpath", "GP", \
+ "directory", \
+ "Define an alternative directory as autoadd library. The default is," \
+ " that the sub-directory called './auto-add/' of all search paths are" \
+ " used. Use {wszst test -vvvv} for tests." )
+
+#:def_opt( "TRANSFORM", "x|transform", "CP", \
+ "list", \
+ "Convert image formats. A comma separated list with terms is expected." \
+ " A term have the syntax @'[SRC=]DEST'@. It means: convert @SRC@" \
+ " format into @DEST@ format. If @SRC=@ is not set, the destination" \
+ " format is used 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 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@" \
+ " (import). Allowed image formats are: @I4, I8, IA4, IA8, RGB565" \
+ " (=R565), RGB5A3 (=R3), RGBA32 (=R32), C4, C8, C14X2, CMPR@. Allowed" \
+ " palette formats are: @P-IA8 (=P8), P-RGB565 (=P565), P-RGB5A3" \
+ " (=P3)@. Attributtes are @PALETTE@, @NO-PALETTE@, @GRAY@, @COLOR@," \
+ " @ALPHA@ and @NO-ALPHA@.\n" \
+ " All terms are managed as list. For each graphic the list is" \
+ " iterated until the first SRC tuple of a term matches the graphic." \
+ " Then the destination tuple is used for the transformation.\n" \
+ " The command {wimgt TEST} prints a clearly arranged readable table" \
+ " as result of this option." )
+
+#:def_opt( "STRIP", "strip", "C", \
+ "", \
+ "If creating a PNG file, don't add comments about creator and source" \
+ " formats." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "TINY", "tiny", "GP", \
+ "mode", \
+ "Set tiny mode to a level between 0 and 7." )
+
+#:def_opt( "YAZ0", "yaz0", "G", \
+ "", \
+ "If creating a compressed file, force Yaz0 compression. Yaz0" \
+ " compression is the default, if no compression method is defined by" \
+ " option or setup file." )
+
+#:def_opt( "YAZ1", "yaz1", "G", \
+ "", \
+ "If creating a compressed file, force Yaz1 compression. The difference" \
+ " to Yaz0 is only the magic, which is set to 'Yaz1'." )
+
+#:def_opt( "XYZ", "xyz", "G", \
+ "", \
+ "If creating a compressed file, force XYZ compression (an experimental" \
+ " Yaz0 variant)." )
+
+#:def_opt( "BZ", "bz", "G", \
+ "", \
+ "If creating a compressed file, force BZ compression (a BZIP2" \
+ " variant)." )
+
+#:def_opt( "SH", "sh", "G", \
+ "", \
+ "Dump info using SH syntax. Use {--var name} as prefix." )
+
+#:def_opt( "BASH", "bash", "G", \
+ "", \
+ "Dump info using BASH syntax. Use {--var name} as prefix." )
+
+#:def_opt( "JSON", "json", "G", \
+ "", \
+ "Dump info using JSON syntax. Options {--var} and {--array} are" \
+ " ignored." )
+
+#:def_opt( "PHP", "php", "G", \
+ "", \
+ "Dump infos using PHP syntax. Use {--var name} as variable name of the" \
+ " resulting object." )
+
+#:def_opt( "MAKEDOC", "makedoc", "G", \
+ "", \
+ "Dump infos using MakeDoc syntax. Use {--var name} as variable name of" \
+ " the resulting map." )
+
+#:def_opt( "VAR", "var", "GP", \
+ "varname", \
+ "Use @VARNAME@ as variable name or prefix on script output. The" \
+ " default variabe name is 'res'." )
+
+#:def_opt( "ARRAY", "array", "G", \
+ "", \
+ "Use an array on script output if possible. If arrays are not" \
+ " supported, then append a '_#' suffix with an zero based index to the" \
+ " variable name defined by {--var name}. In this case, only one output" \
+ " file is created." )
+
+#:def_opt( "AVAR", "avar", "GP", \
+ "varname", \
+ "Shortcut for: {--array --var name}" )
+
+#:def_opt( "SOURCE", "s|source|src", "CP", \
+ "path", \
+ "Define a secondary source path (directory/file).\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified primary source name. @%P@ and @%F@ are replaced by" \
+ " the primary source path or by the filename. @%N@ and @%E@ are" \
+ " replaced by primary source filename without extension or by the" \
+ " source extension. Finally, @%T@ is replaced by the default extension" \
+ " of a virtual destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_SRC", "remove-src|removesrc|rm-src|rmsrc", "C", \
+ "", \
+ "Remove the source file after successful operation. @--rm-src@ is a" \
+ " short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "IGNORE_SETUP", "ignore-setup|ignoresetup", "C", \
+ "", \
+ "Ignore hidden setup file '@wszst-setup.txt@'. This file is used to" \
+ " determine some default settings and to find out sub archives and" \
+ " files to encode. Use this option only if you know what you do." )
+
+#:def_opt( "PURGE", "purge", "C", \
+ "", \
+ "Remove repeated files with same checksum." )
+
+#:def_opt( "ALIGN_U8", "align-u8|alignu8", "CP", \
+ "size", \
+ "Define an align value for the sub files in U8 archives. The value" \
+ " must be a power of 2 and the default value is 32 (0x20) This value" \
+ " is only relevant if creating or normalizing U8 archives." )
+
+#:def_opt( "ALIGN_PACK", "align-pack|alignpack", "CP", \
+ "size", \
+ "Define an align value for the sub files in PACK archives. The value" \
+ " must be a power of 2 and the default value is 32 (0x20) This value" \
+ " is only relevant if creating or normalizing OACK archives." )
+
+#:def_opt( "ALIGN_BRRES", "align-brres|alignbrres", "CP", \
+ "size", \
+ "Define an align value for the sub files in BRRES archives. The value" \
+ " must be a power of 2 and the default value is 4 This value is only" \
+ " relevant if creating or normalizing BRRES archives." )
+
+#:def_opt( "ALIGN_BREFF", "align-breff|alignbreff", "CP", \
+ "size", \
+ "Define an align value for the sub files in BREFF archives. The value" \
+ " must be a power of 2 and the default value is 4 This value is only" \
+ " relevant if creating or normalizing BREFF archives." )
+
+#:def_opt( "ALIGN_BREFT", "align-breft|alignbreft", "CP", \
+ "size", \
+ "Define an align value for the sub files in BREFT archives. The value" \
+ " must be a power of 2 and the default value is 0x20 This value is" \
+ " only relevant if creating or normalizing BREFT archives." )
+
+#:def_opt( "ALIGN", "align", "CP", \
+ "size", \
+ "Define an align value for the sub files in all archives. This is a" \
+ " short cut for {--align-u8=size --align-pack=size --align-brres=size" \
+ " --align-breff=size --align-breft=size}." )
+
+#:def_opt( "ENCODE_ALL", "encode-all|encodeall|eall", "C", \
+ "", \
+ "Encode all files. Normally a file is only encoded, if the source is" \
+ " younger than the destination or the destination is missing. Only" \
+ " files in the @[encode]@ section of the file '@wszst-setup.txt@' are" \
+ " candidates for encoding. @--eall@ is a short cut. Option" \
+ " {--no-encode} takes precedence over {--encode-all}." )
+
+#:def_opt( "ENCODE_IMG", "encode-img|encodeimg|eimg", "C", \
+ "", \
+ "Encode all image files. Normally a image file is only encoded, if the" \
+ " source is younger than the destination or the destination is" \
+ " missing. Only files in the @[encode]@ section of the file" \
+ " '@wszst-setup.txt@' are candidates for encoding. @--eimg@ is a short" \
+ " cut. If set, option {--no-encode} is ignored for images." )
+
+#:def_opt( "NO_ENCODE", "no-encode|noencode|noenc", "C", \
+ "", \
+ "Do not encode files before creating an archive. @--noenc@ is a short" \
+ " cut. Option {--no-encode} takes precedence over {--encode-all}, but" \
+ " {--encode-img} takes precedence for images." )
+
+#:def_opt( "NO_RECURSE", "no-recurse|norecurse|norec", "C", \
+ "", \
+ "Do not create archives recursively. Normally files in the @[create]@" \
+ " section of the file '@wszst-setup.txt@' are created first. @--norec@" \
+ " is a short cut." )
+
+#:def_opt( "AUTO_ADD", "auto-add|autoadd|aadd", "C", \
+ "", \
+ "Analyze the KMP (if exist) and add missing BRRES, BREFF, BREFT, BRASD" \
+ " and KCL files automatically, if the tool can find the files in any" \
+ " sub directory named 'auto-add'. This sub directory is searched in" \
+ " all directories of @'SEARCH_PATH'@; use command @{wszst AUTOADD}@ to" \
+ " view them. Command {wszst AUTOADD} may also create an auto-add" \
+ " database. @--aadd@ is a short cut." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "NO_CHECK", "N|no-check|nocheck", "C", \
+ "", \
+ "Do not make plausibility checks for KCL and KMP files." )
+
+#:def_opt( "PT_DIR", "pt-dir|ptdir|pdir", "CO", \
+ "[=mode]", \
+ "Set one of the `point directory' modes @REMOVE@ (=@0@), @FORCE@" \
+ " (=@1@) or @AUTO@ (default). If --pt-dir is used without parameter," \
+ " then @FORCE@ is assumed.\n" \
+ " This option is only relevant if creating an U8 archive. It decides," \
+ " if a special directory with name '.' will be added as base for all" \
+ " other files." )
+
+#:def_opt( "RM_AIPARAM", "rm-aiparam|rmaiparam|rmai", "C", \
+ "", \
+ "Remove the directory AIParam and all files from the archive. This" \
+ " option has only impact, if creating a new archive or normalizing an" \
+ " existing archive. @--rmai@ is a short cut." )
+
+#:def_opt( "U8", "u8", "C", \
+ "", \
+ "Create an U8 archive, if possible. If the source is a WU8 archive," \
+ " convert it to an U8 archive. This is the default if the setup file" \
+ " '@wszst-setup.txt@' has no other definition. The default compression" \
+ " mode is set to Yaz0 (see {--yaz0})." )
+
+#:def_opt( "SZS", "szs", "C", \
+ "", \
+ "Short cut for {--u8 --yaz0}: Create an U8 archive, if possible, and" \
+ " set the compression method to Yaz0." )
+
+#:def_opt( "WU8", "wu8", "C", \
+ "", \
+ "Create a WU8 archive, if possible. If the source is an U8 archive," \
+ " convert it to a WU8 archive." )
+
+#:def_opt( "WBZ", "wbz", "C", \
+ "", \
+ "Short cut for {--wu8 --bz}: Create a WU8 archive, if possible, and" \
+ " set the compression method to BZ." )
+
+#:def_opt( "PACK", "pack", "C", \
+ "", \
+ "Create a PACK archive." )
+
+#:def_opt( "BRRES", "brres|bres", "C", \
+ "", \
+ "Create a BRRES archive." )
+
+#:def_opt( "BREFF", "breff", "C", \
+ "", \
+ "Create a BREFF archive." )
+
+#:def_opt( "BREFT", "breft", "C", \
+ "", \
+ "Create a BREFT archive." )
+
+#:def_opt( "NO_COMPRESS", "no-compress|nocompress|noc", "C", \
+ "", \
+ "Create an uncompressed file instead of a compressed SZS file. The" \
+ " default destination changes to @'%P/%N%T'@. @--noc@ is a short cut." )
+
+#:def_opt( "COMPRESS", "C|compr|compress", "CP", \
+ "level", \
+ "Define a compression level between @0..9@: @0@ (or @NOCHUNKS@)" \
+ " disables finding chunks, @1@ (or @FAST@) for the fastest standard" \
+ " compression and @9@ (or @BEST@) for the best (=default) compression." \
+ " @10@ (or @ULTRA@) and @100-150@ are special time-consuming" \
+ " compression modes. They are dedicated to competitions with size" \
+ " limitations. The special value @UNCOMPRESSED@ acts like option" \
+ " {--no-compress}.\n" \
+ " Because of many repeated data, the best bz-compression mode varies." \
+ " Therefor the levels @TRY2..TRY5@ (or short @T2..T5@) are defined to" \
+ " find the best compression mode with testing the first N modes of 9," \
+ " 1, 8, 2, 5. @TRY2@ is used for normalizing. For non bz-compression," \
+ " @TRY*@ are the same as @BEST@.\n" \
+ " Option {--norm} takes precedence over {--compr} and sets the" \
+ " compression level to @TRY2@ (@BEST@).\n" \
+ " For more modes and details type {wszst -C list}. To force colorized" \
+ " output type {wszst -C clist}." )
+
+#:def_opt( "FAST", "fast", "C", \
+ "", \
+ "Short cut for {--compr=fast}: Set the fastest real compression. It" \
+ " also overrides compression rates set by {--norm} or {--compr}." )
+
+#:def_opt( "NORM", "n|norm", "C", \
+ "", \
+ "The uncompressed data will be normalized. See command {NORMALIZE} for" \
+ " more details." )
+
+#:def_opt( "LINKS", "links", "C", \
+ "", \
+ "Support hardlinks while creating U8 and WU8 archives. Keep hardlinks" \
+ " if normalizing U8 and WU8 archives. On extracting, search hardlinks" \
+ " in every archive and try to create hardlinks at local file system." )
+
+#:def_opt( "BASEDIR", "basedir|bdir", "CP", \
+ "directory", \
+ "Extract only files from archives, that are below the DIRECTORY." \
+ " Leading points and slashes and trailing slahes are removed from the" \
+ " parameter. --bdir is short cut for --basedir." )
+
+#:def_opt( "RECURSE", "R|recurse", "CO", \
+ "[=level]", \
+ "If a extracted file is a known and supported archive, than extract it" \
+ " recursively until the entered level is reached. Level 0 (=@NONE@)" \
+ " deactivates this. If --recurse is used without parameter, then" \
+ " @UNLIMITED@ is assumed.\n" \
+ " -R does'nt accept a parameter and is a short cut for" \
+ " {--recurse=unlimited}." )
+
+#:def_opt( "EXT", "e|ext", "C", \
+ "", \
+ "For BRRES archives only: If a file is extracted, add a handy file" \
+ " extension like '.mdl' to the file name. If set twice and a textual" \
+ " file magic is available, use the file magic in lower case instead" \
+ " like '.mdl0'." )
+
+#:def_opt( "DECODE", "decode|dec", "C", \
+ "", \
+ "If a extracted file is known and can be decoded, do it. @--dec@ is a" \
+ " short cut." )
+
+#:def_opt( "MIPMAPS", "mipmaps|mm", "C", \
+ "", \
+ "If reading a source, scan for mipmaps and load them too. For PNG" \
+ " files, files named @NAME.mm#.EXT@ with #=1.. are searched. This is" \
+ " the default. @--mm@ is a short cut." )
+
+#:def_opt( "NO_MIPMAPS", "no-mipmaps|nomipmaps|no-mm|nomm", "C", \
+ "", \
+ "If reading a source, ignore mipmaps. This disables not the creation" \
+ " of mipmaps (see {-n-mipmaps}). @--no-mm@ is a short cut." )
+
+#:def_opt( "N_MIPMAPS", "n-mipmaps|nmipmaps|n-mm|nmm", "CP", \
+ "num", \
+ "Force the number of mipmaps. Values between 0 and 20 are allowed." \
+ " Value @OFF@ (default) disables this option. If enabled, options" \
+ " @--max-mipmaps@ and @--mipmap-size@ are ignored. The creation of" \
+ " mipmaps stops if the width or the height of the mipmap becomes 0." \
+ " @--n-mm@ is a short cut." )
+
+#:def_opt( "MAX_MIPMAPS", "max-mipmaps|maxmipmaps|max-mm|maxmm", "CP", \
+ "num", \
+ "Control the automatic mipmap creation. Values between 0 and 20 are" \
+ " allowed and the default is 4. The mipmap creation for an image" \
+ " stops, if the set number is reached. This option is ignored, if" \
+ " @--n-mipmaps@ is enabled. @--max-mm@ is a short cut." )
+
+#:def_opt( "MIPMAP_SIZE", "mipmap-size|mipmapsize|mm-size|mmsize", "CP", \
+ "num", \
+ "Define the minimal width and minimal height of a generated mipmap." \
+ " Any value >0 is allowed. The default is 8. This option is ignored," \
+ " if @--n-mipmaps@ is enabled. @--mm-size@ is a short cut." )
+
+#:def_opt( "FAST_MIPMAPS", "fast-mipmaps|fastmipmaps|fast-mm|fastmm", "C", \
+ "", \
+ "If resizing an image, use the old fast resize algorithm (default" \
+ " until v1.64a) instead of the new smart one. Both algorithms differ" \
+ " only, when creating a mipmap for images with odd width or odd" \
+ " height. The old algorithm is faster (factor 2-4) than the default" \
+ " algorithm, but the new algorithm creates better resized images." \
+ " @--fast-mm@ is a short cut." )
+
+#:def_opt( "CMPR_DEFAULT", "cmpr-default", "CP", \
+ "rgb1[,rgb2]", \
+ "Define 2 colors for the case, that all 16 pixels of a CMPR block are" \
+ " transparent. The default is to calculate an average color of all" \
+ " transparent pixels. Before v2.04 white was used.\n" \
+ " 2 RGB values (hex values with 6 digits each) are expected as" \
+ " parameter. If optional @RGB2@ is missed, a copy of @RGB1@ is used." \
+ " As first step, both colors are converted to RGB565 colors @C1@ and" \
+ " @C2@ and sorted, so that @C1<C2@ (mandatory for CMPR). If @C1@ and" \
+ " @C2@ are identical, the least significant bit of green is cleared" \
+ " for @C1@ and set for @C2@.\n" \
+ " Use parameter '@0@' to force black, '@-1@' to force white, or '@-@'" \
+ " to reset to auto calculation." )
+
+#:def_opt( "CUT", "cut", "C", \
+ "", \
+ "Cut different non archive files into smaller peaces (logical units" \
+ " like headers, groups, sections) or list these peaces as single sub" \
+ " files for a more detailed analysis. Supported file types are @BMG," \
+ " BREFT-IMG, KMP, PAT, TEX, TPL, BRRES@ sub files and more." )
+
+#:def_opt( "ALL", "a|all", "CM", \
+ "", \
+ "Extract and decode all known and supported files recursively. This is" \
+ " a short cut for {--recurse --decode --mipmaps}. If entered twice," \
+ " option {--cut} is included too." )
+
+#:def_opt( "RAW", "raw", "C", \
+ "", \
+ "Extract BRRES sub file in raw mode and do not adjust string pointers" \
+ " and other offsets." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEST", "VERBOSE", \
+ "", \
+ "Print the matrices of transformations." )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BRSUB", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BRSUB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BRSUB", "LONG", \
+ "", \
+ "If set, print hints about unusual versions too. If set twice, print a" \
+ " status line for each found BRRES sub file." )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "BRIEF", \
+ "", \
+ "If set once, suppress vector dumps for transformation steps and" \
+ " ignore option --long. If set twice, suppress vector dump for final" \
+ " transformation too." )
+
+#:def_cmd_opt( "MATRIX", "LONG", \
+ "", \
+ "If set once, print inverse matrix for the final transformation. If" \
+ " set twice, print inverse matrix for all transformations." )
+
+#:def_cmd_opt( "MATRIX", "QUIET", \
+ "", \
+ "Option --quiet is dedicated to automatic tests comparing the old and" \
+ " new transformation algorithms. If set once, the tables are only" \
+ " printed, if the results differ. If set twice, nothing is printed at" \
+ " all and only the exit status will inform about the results." )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VR_CALC", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VR_CALC", "BRIEF", \
+ "", \
+ "Suppress header and print only results for @VR_winner-VR_looser@." )
+
+#:def_cmd_opt( "VR_RACE", "LONG", \
+ "", \
+ "Print full matrix of delta values." )
+
+#:def_cmd_opt( "AUTOADD", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "AUTOADD", "QUIET", \
+ "", \
+ " If set, suppress logging." )
+
+#:def_cmd_opt( "AUTOADD", "VERBOSE", \
+ "", \
+ "If set, list all missed and invalid files of the current auto-add" \
+ " archive after the adding operation. If set twice, then additionally" \
+ " list all already existing files in the current auto-add archive." )
+
+#:def_cmd_opt( "AUTOADD", "DEST", \
+ "", \
+ "Define a destination directory as current auto-add archive. The" \
+ " default is the standard auto-add path. Try {AUTOADD} without sources" \
+ " to view the path." )
+
+#:def_cmd_opt( "AUTOADD", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "AUTOADD", "OVERWRITE", \
+ "", \
+ "Overwrite already existing files instead of only adding new files to" \
+ " the auto-add archive." )
+
+#:def_cmd_opt( "AUTOADD", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "AUTOADD", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "VERBOSE", \
+ "", \
+ "Print an additonally hex status value as second column before the" \
+ " file name. These values can be used to find a selection mask." )
+
+#:def_cmd_opt( "TRACKS", "ALL", \
+ "", \
+ "Print the '_d' files too. If set twice, print all files (same as" \
+ " -all)." )
+
+#:def_cmd_opt( "TRACKS", "LONG", \
+ "", \
+ "Print 5 non track files too. If set twice, print 4 more files with" \
+ " old BRRES sub file formats too." )
+
+#:def_cmd_opt( "TRACKS", "PIPE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SCANCACHE", "CACHE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SCANCACHE", "PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SUBFILE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "LONG", \
+ "", \
+ "If set, the size of each file is printed. If set twice, offset and" \
+ " size are printed. If set three times, debugging mode is enabled." )
+
+#:def_cmd_opt( "LIST", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "LONG", \
+ "", \
+ "If set, the size of each file is printed. If set twice, offset and" \
+ " size are printed. If set three times, debugging mode is enabled." )
+
+#:def_cmd_opt( "LIST_L", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "LONG", \
+ "", \
+ "If set, the size of each file is printed. If set twice, offset and" \
+ " size are printed. If set three times, debugging mode is enabled." )
+
+#:def_cmd_opt( "LIST_LL", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "LONG", \
+ "", \
+ "If set, the size of each file is printed. If set twice, offset and" \
+ " size are printed. If set three times, debugging mode is enabled." )
+
+#:def_cmd_opt( "LIST_LLL", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LLL", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "LONG", \
+ "", \
+ "If set, the size of each file is printed. If set twice, offset and" \
+ " size are printed. If set three times, debugging mode is enabled." )
+
+#:def_cmd_opt( "LIST_A", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_A", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "LONG", \
+ "", \
+ "If set, the size of each file is printed. If set twice, offset and" \
+ " size are printed. If set three times, debugging mode is enabled." )
+
+#:def_cmd_opt( "LIST_LA", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LA", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NAME_REF", "SORT", \
+ "", \
+ "Define the sort order of the reference. @NONE@ (default) uses the" \
+ " order of the string pool. @BRRES@ orders in standard BRRES order by" \
+ " ASCCI value and case sensitive. @NAME@ similar to @BRRES@, but case" \
+ " insensitive. @OFFSET@ orders by the file offset of first usage." )
+
+#:def_cmd_opt( "NAME_REF", "BRIEF", \
+ "", \
+ "If set, suppress the offsets of the strings. This makes comparisons" \
+ " after name changes easier. If set twice, suppress reference offsets" \
+ " too. If set 3 times, suppress all offsets." )
+
+#:def_cmd_opt( "NAME_REF", "LONG", \
+ "", \
+ "If set, a list ordered by @NAME@ or @BRRES@ (default) and a second" \
+ " list ordered by @OFFSET@ is printed. If set twice, a third list with" \
+ " order @NONE@ is appended." )
+
+#:def_cmd_opt( "ILIST", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "LONG", \
+ "", \
+ "If set, image width, height and size are printed. If set twice, a" \
+ " block info and attribites are printed too." )
+
+#:def_cmd_opt( "ILIST", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "LONG", \
+ "", \
+ "If set, image width, height and size are printed. If set twice, a" \
+ " block info and attribites are printed too." )
+
+#:def_cmd_opt( "ILIST_L", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_L", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "LONG", \
+ "", \
+ "If set, image width, height and size are printed. If set twice, a" \
+ " block info and attribites are printed too." )
+
+#:def_cmd_opt( "ILIST_LL", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LL", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "LONG", \
+ "", \
+ "If set, image width, height and size are printed. If set twice, a" \
+ " block info and attribites are printed too." )
+
+#:def_cmd_opt( "ILIST_A", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_A", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "LONG", \
+ "", \
+ "If set, image width, height and size are printed. If set twice, a" \
+ " block info and attribites are printed too." )
+
+#:def_cmd_opt( "ILIST_LA", "SORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ILIST_LA", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "DECODE", \
+ "", \
+ "Decode binary files to find memory addresses of sections." )
+
+#:def_cmd_opt( "MEMORY", "MIPMAPS", \
+ "", \
+ "Analyze images and dump mipmap adresses too." )
+
+#:def_cmd_opt( "MEMORY", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALL", \
+ "", \
+ "A short cut for {--recurse --decode --mipmaps}. If entered twice," \
+ " option --cut is included too." )
+
+#:def_cmd_opt( "MEMORY", "LONG", \
+ "", \
+ "If set, print absolute offsets too." )
+
+#:def_cmd_opt( "MEMORY", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "DECODE", \
+ "", \
+ "Decode binary files to find memory addresses of sections." )
+
+#:def_cmd_opt( "MEMORY_A", "MIPMAPS", \
+ "", \
+ "Analyze images and dump mipmap adresses too." )
+
+#:def_cmd_opt( "MEMORY_A", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALL", \
+ "", \
+ "A short cut for {--recurse --decode --mipmaps}. If entered twice," \
+ " option --cut is included too." )
+
+#:def_cmd_opt( "MEMORY_A", "LONG", \
+ "", \
+ "If set, print absolute offsets too." )
+
+#:def_cmd_opt( "MEMORY_A", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MEMORY_A", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "DUMP", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "SHA1", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "ID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "BASE64", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "DB64", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "CODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "VERIFY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SHA1", "BRIEF", \
+ "", \
+ "Suppress output of the filename." )
+
+#:def_cmd_opt( "SHA1", "LONG", \
+ "", \
+ "If set and {--db64} is not active, start the line with the length of" \
+ " the decompressed source as decimal number (field width 9) separated" \
+ " with a comma from the SHA1 checksum. If set twice, prefix each line" \
+ " with the modification time in the format @'yyyy-mm-dd HH:MM:SS '@.\n" \
+ " If set and {--db64} is active, then CKPT lap counter, STGI lap" \
+ " counter, speed factor and slot info are inserted beteen checksum and" \
+ " filename. All columns are separated by one or two spaces." )
+
+#:def_cmd_opt( "ANALYZE", "LONG", \
+ "", \
+ "Append a list of special files with size, SHA1 and file name." )
+
+#:def_cmd_opt( "ANALYZE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "QUIET", \
+ "", \
+ "Suppress logging of input and output files." )
+
+#:def_cmd_opt( "ANALYZE", "SH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "BASH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "JSON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "PHP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "MAKEDOC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "VAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ARRAY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "AVAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "DISTRIBUTION", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "BASE64", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "DB64", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "CODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DISTRIBUTION", "SOURCE", \
+ "", \
+ "Define a text file for filename to slot translation. A »slot" \
+ " filename« list is expected. Use this option multiple times to" \
+ " define more than one source file. A definition of a later source" \
+ " overwrites previous definitions. The file @RESULT@ of the command" \
+ " line is appended automatically as last entry, if exists and not" \
+ " already included." )
+
+#:def_cmd_opt( "DIFF", "QUIET", \
+ "", \
+ "If set once, only a summary status for each section is printed. If" \
+ " set twice, only a total summary status is printed. If set three" \
+ " times, the status is only reported as exit status." )
+
+#:def_cmd_opt( "DIFF", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_CHECK", \
+ "", \
+ "Don't check the KCL and KMP files." )
+
+#:def_cmd_opt( "CHECK", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BRIEF", \
+ "", \
+ "Print only warnings and suppress hints." )
+
+#:def_cmd_opt( "CHECK", "LONG", \
+ "", \
+ "Be verbose and print more statistics." )
+
+#:def_cmd_opt( "CHECK", "QUIET", \
+ "", \
+ "Be quiet until the first warning or hint is found." )
+
+#:def_cmd_opt( "CHECK", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "CHECK", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "BRIEF", \
+ "", \
+ "Print the slot list in a compressed form without spaces." )
+
+#:def_cmd_opt( "SLOTS", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "SLOTS", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "IGNORE", \
+ "", \
+ "If set, ignore non existing source files and files without KMP" \
+ " without warning. If set twice, ignore files with standard settings" \
+ " too." )
+
+#:def_cmd_opt( "ISARENA", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ISARENA", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ISARENA", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ISARENA", "BRIEF", \
+ "", \
+ "If set, suppress the output of header and filenames." )
+
+#:def_cmd_opt( "ISARENA", "QUIET", \
+ "", \
+ "If set, print nothing and set only the exit status." )
+
+#:def_cmd_opt( "ISARENA", "IGNORE", \
+ "", \
+ "If set, ignore non existing source files and files without KMP" \
+ " without warning." )
+
+#:def_cmd_opt( "NORMALIZE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "REMOVE_SRC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "NORMALIZE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REMOVE_SRC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "REMOVE_SRC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "GAMEMODES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "REMOVE_SRC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUPLICATE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "LONG", \
+ "", \
+ "If set, print the matrices too. If set twice, print minimum and" \
+ " maximum values too." )
+
+#:def_cmd_opt( "MINIMAP", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "TOUCH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "AUTO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SET_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SET_SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SET_ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SET_X", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SET_Y", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SET_Z", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "XCENTER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "YCENTER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ZCENTER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "CENTER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MINIMAP", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "REMOVE_SRC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COMPRESS", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "REMOVE_SRC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "NORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECOMPRESS", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "ENCODE", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "IGNORE_SETUP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "WU8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "YAZ0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "YAZ1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "SZS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "WBZ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "RM_AIPARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALIGN_U8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALIGN_PACK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALIGN_BRRES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALIGN_BREFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALIGN_BREFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALL", \
+ "", \
+ " Encode all files. This is a short cut for {--encode-all} (and more" \
+ " options in the future)." )
+
+#:def_cmd_opt( "CREATE", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "AUTO_ADD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "SOURCE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NO_COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "COMPRESS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "FAST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ENCODE_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ENCODE_IMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NO_ENCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NO_RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "UPDATE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "BASEDIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "DECODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "EXTRACT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "DELTA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "RAW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "BASEDIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "DECODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "XDECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "DELTA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "RAW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XDECODE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "BASEDIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "DECODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "XEXPORT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "DELTA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "RAW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XEXPORT", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "BASEDIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "RECURSE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "EXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LINKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "DECODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "CUT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "XALL", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "DELTA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "RAW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XALL", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XCOMMON", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "KMG_LIMIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "KMG_COPY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BINARY", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "DECODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "KMG_LIMIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "KMG_COPY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "TEXT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "DELTA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "LONG", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_cmd_opt( "TEXT", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEXT", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "DECODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "DELTA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "LONG", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_cmd_opt( "BMG", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "BMG", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "LONG", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_cmd_opt( "BMG", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "KCL", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KCL", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "KMP", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "MINIMAP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "PATCH_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KMP", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LEX", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LEX", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in decoded text files." )
+
+#:def_cmd_opt( "LEX", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LEX", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "INFO", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "INFO", "NO_HEADER", \
+ "", \
+ "Suppress output of the printed filename." )
+
+#:def_cmd_opt( "GHOST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "NO_HEADER", \
+ "", \
+ "Suppress output of the printed filename." )
+
+#:def_cmd_opt( "GHOST", "SH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "BASH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "JSON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "PHP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "MAKEDOC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "VAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "ARRAY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "AVAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GHOST", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "YAZDUMP", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VEHICLE", "SOURCE", \
+ "", \
+ "Load the file instead of using the internal base." )
+
+#:def_cmd_opt( "VEHICLE", "DEST", \
+ "", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output." )
+
+#:def_cmd_opt( "VEHICLE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VEHICLE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VEHICLE", "QUIET", \
+ "", \
+ "Suppress logging." )
+
+#:def_cmd_opt( "VEHICLE", "VERBOSE", \
+ "", \
+ "Log patching." )
+
+#:def_cmd_opt( "VEHICLE", "BRIEF", \
+ "", \
+ "Suppress min/max counts on dumps." )
+
+
+##
+###############################################################################
+############### Tool 'wbmgt' ###############
+###############################################################################
+
+#:def_tool( "wbmgt", \
+ "wbmgt [option]... command [option|parameter|@file]...", \
+ "Wiimms BMG Tool : Convert and patch raw and text BMG (message) files." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wbmgt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wbmgt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wbmgt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wbmgt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wbmgt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wbmgt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wbmgt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wbmgt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wbmgt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wbmgt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wbmgt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "POINTS", "POINTS|PTS", \
+ "wbmgt POINTS [--points=list]", \
+ "Print a table with the points assigned to player after a versus or" \
+ " room race." )
+
+#:def_cmd( "REGEXP", "REGEXP|RE", \
+ "wbmgt REGEXP pattern string...", \
+ "Test implementation of regular expressions. PATTERN is the regular" \
+ " expression to find matches. Each STRING is object of the match and" \
+ " replace operation." )
+
+#:def_cmd( "EXTRACT", "EXTRACT", \
+ "wbmgt EXTRACT name source", \
+ "Extract BMG section NAME of file SOURCE and write the binary data to" \
+ " standard output. If NAME consists of less than 4 characters, then" \
+ " the first section that starts with these characters is dumped." )
+
+#:def_cmd( "SECTIONS", "SECTIONS", \
+ "wbmgt SECTIONS [source]...", \
+ "List all sections of each binary BMG file. Print offset, size, magic" \
+ " and a short info. If known, print number and size of elements too." )
+
+#:def_cmd( "LIST", "LIST|LS|LL", \
+ "wbmgt LIST [source]...", \
+ "List messages to proof the content. Patches are applied before" \
+ " listing. The lines are cut to fit the terminal width." )
+
+#:def_cmd( "SLOTS", "SLOTS", \
+ "wbmgt SLOTS [source]...", \
+ "Print a slot ordered list with slot number, message id, delta and" \
+ " attributes. Patches are applied before listing." )
+
+#:def_cmd( "DIFF", "DIFF|CMP", \
+ "wbmgt DIFF source1 source2\n" \
+ "wbmgt DIFF source... --dest dest\n", \
+ "Compare two or more BMG (raw or text) files on string level and" \
+ " report mismatches for each string. If option {--dest} is set, then" \
+ " each source file is compared with a file in the destination. Patches" \
+ " are applied to all sources before comparing." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wbmgt CAT [source]...", \
+ "Read the entered BMG files (text, binary or szs sub file) and print" \
+ " them as decoded text files to standard output. All BMG files of a" \
+ " single archive (SZS,...) are combined to 1 source. The output of all" \
+ " source files is concatenated." )
+
+#:def_cmd( "MIX", "MIX", \
+ "wbmgt MIX [source]...", \
+ "Read the entered BMG files (text, binary or szs sub file) and print" \
+ " them as decoded text files to standard output. All BMG files of all" \
+ " archives (SZS,...) are read. The output of all source files is" \
+ " combined and strings of later source files override prior defined" \
+ " strings." )
+
+#:def_cmd( "IDENTIFIER", "IDENTIFIER|ID|IDENTIFY", \
+ "wbmgt IDENTIFIER", \
+ "Create a simple text BMG with the identifier message @3DEF@ only with" \
+ " respect to options {--le-code} and {--ct-code}. Print the result to" \
+ " standard output." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wbmgt DECODE [szs]...", \
+ "Read the entered message files and decode them to text files. All BMG" \
+ " files of a single archive (SZS,...) are concatenated to 1 source." \
+ " This command is similar to {PATCH}, but the result is always" \
+ " decoded. The default destination is @'%P/%N.txt'@." )
+
+#:def_cmd( "ENCODE", "ENCODE|ENC", \
+ "wbmgt ENCODE [source]...", \
+ "Read the entered message files and encode them to BMG files. All BMG" \
+ " files of a single archive (SZS,...) are concatenated to 1 source." \
+ " This command is similar to {PATCH}, but the result is always" \
+ " encoded. The default destination is @'%P/%N.bmg'@." )
+
+#:def_cmd( "PATCH", "PATCH|PAT", \
+ "wbmgt PATCH [source]...", \
+ "Patch the entered files by using the patch list specified by option" \
+ " {--patch-bmg}. The coding of the source files is not changed. The" \
+ " default destination is @'%P/%F'@.\n" \
+ " Use {wszst patch --patch-bmg ...} to patch BMG files within a SZS" \
+ " file." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "Enable LE-CODE and CT-CODE support. The optional parameter is" \
+ " deprecated and ignored." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "If set, the information header in decoded text files is suppressed" \
+ " (for historical reasons same as {--no-header}). If set at least" \
+ " twice, all comments are suppressed and the output is packed without" \
+ " empty lines. If set 3 times, the @#BMG@ file indentification is also" \
+ " suppressed." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TRACKS", "T|tracks", "GP", \
+ "tracks", \
+ "Define a new track order. A comma separated list in the format" \
+ " @[a=]b@ or @a:=b@ is expected. @'a'@ and @'b'@ are track names or" \
+ " slot numbers. @'a'@ is the destination slot and @'b'@ the assigned" \
+ " track. If @'a'@ is omitted, the next slot is used; this means" \
+ " @[a=]b,c,d@ is possible.\n" \
+ " Tracks will only be exchanged so that always all tracks are" \
+ " assigned. But if using @':='@ the new slots are assigned without" \
+ " exchanging and the old values are lost." )
+
+#:def_opt( "ARENAS", "A|arenas", "GP", \
+ "arenas", \
+ "Define a new arena order. A comma separated list in the format" \
+ " @[a=]b@ or @a:=b@ is expected. @'a'@ and @'b'@ are arena names or" \
+ " slot numbers. @'a'@ is the destination slot and @'b'@ the assigned" \
+ " arena. If @'a'@ is omitted, the next slot is used; this means" \
+ " @[a=]b,c,d@ is possible.\n" \
+ " Arenas will only be exchanged so that always all arenas are" \
+ " assigned. But if using @':='@ the new slots are assigned without" \
+ " exchanging and the old values are lost." )
+
+#:def_opt( "POINTS", "points|pts", "GP", \
+ "list", \
+ "This option creates the new message 3FF0 to hold a description of the" \
+ " versus points table. It defines a new table for the points assigned" \
+ " to players after a versus or room race. The parameter is a blank or" \
+ " comma and slash (next row) separated list with numbers (points)" \
+ " between 0 and 255 and the following keywords: @NINTENDO, LINEAR," \
+ " WIN, WIN15, WIN25@ to select a predefined table; @NO-BONUS, BONUS," \
+ " NULL, ONE@ as options; @N1..N12@ to select the row for N players." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "ALIGN", "align", "CP", \
+ "size", \
+ "Define an align value for the sub sections in the archive. The value" \
+ " must be a power of 2 and the default value is 32 (0x20)" )
+
+#:def_opt( "PATCH_BMG", "P|patch-bmg|patchbmg|pb|patch", "CMP", \
+ "mode[cond][=param]", \
+ "This option specifies a BMG patch mode. Some of the modes need a" \
+ " parameter or a file name of a BMG patch file (raw or text BMG), both" \
+ " separated by an equal sign. Modes with required file names are" \
+ " @PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL@ and" \
+ " @NOTEQUAL@. Modes with text parameter are @FORMAT@, @REGEXP@ and" \
+ " @RM-REGEXP@. Standalone modes are @ID, ID-ALL, UNICODE, RM-ESCAPES," \
+ " RM-CUPS, CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY," \
+ " LE-FILL, X-COPY, X-FORCE-COPY@ and @X-FILL@. Unique abbreviations" \
+ " are allowed.\n" \
+ " The optional condition @COND@ is either '@?MID@' or '@!MID@'. In" \
+ " case of '@?MID@', the patch is only applied if the message id MID" \
+ " already exists. In case of '@!MID@', the patch is only applied if" \
+ " the message id MID does not exists.\n" \
+ " If this option is used multiple times, all patch files will be" \
+ " processed in the entered order. @--patch@ is a short cut." )
+
+#:def_opt( "MACRO_BMG", "macro-bmg|macrobmg|mb", "CMP", \
+ "file", \
+ "Load a BMG file and add the messages to the macro library; already" \
+ " existing entries are replaced. The macro library is accessed by" \
+ " escape sequence @\\m{{MID}@ as fallback, if the active file has not" \
+ " already defined the message @MID@ by itself." )
+
+#:def_opt( "FILTER_BMG", "filter-bmg|filterbmg|fb|msg", "CMP", \
+ "list", \
+ "If this option is set, the BMG messages are filtered by this list." \
+ " Only enabled messages are exported to the output BMG file (binary or" \
+ " text).\n" \
+ " The parameter is a list of message ids (short MID, 'Txx' or 'Uxx'" \
+ " or Mxx' or hex number) or message ranges (MID:MID) or one of the" \
+ " keywords @NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT," \
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE)," \
+ " LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS," \
+ " XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS," \
+ " GENERIC@ or @ALL@. If an element is preceded by a minus sign, it is" \
+ " removed from the filter list (disabled).\n" \
+ " With v2.01a, this option was renamed from --msg to the more" \
+ " meaningful name --filter-bmg. The old name is still available." )
+
+#:def_opt( "BMG_ENCODING", "encoding|bmg-encoding|bmgencoding", "CP", \
+ "name", \
+ "Force a BMG encoding for new BMG files. Accepted encoding names are:" \
+ " @CP-1252@, @UTF-16BE@ (or @UTF-16@), @SHIFT-JIS@, @UTF-8@ and @AUTO@" \
+ " for automatic detection (default). Same keywords without minus signs" \
+ " are accepted too.\n" \
+ " Mario Kart Wii uses encoding @UTF-16BE@; the default if no other" \
+ " encoding is defined." )
+
+#:def_opt( "BMG_INF_SIZE", "inf-size|infsize|bmg-inf-size|bmginfsize", "CP", \
+ "size", \
+ "Defines the 'INF1' size of new BMG files between 4 and 1000. The" \
+ " first 4 bytes of a INF1 record is an offset into the string pool and" \
+ " the remaining bytes the attributes. Maximal 40 attribute bytes are" \
+ " supported and additional bytes are assumed to be NULL. All BMG files" \
+ " of MKW have a size of 8." )
+
+#:def_opt( "BMG_MID", "bmg-mid|bmgmid", "CO", \
+ "[mode]", \
+ "Control the creation of BMG section @MID1@. Suppress the creation, if" \
+ " mode is @OFF@. Force the creation, if mode is @ON@. On mode @AUTO@" \
+ " (default), the source is analysed for the decision." )
+
+#:def_opt( "FORCE_ATTRIB", "force-attrib|forceattrib", "CP", \
+ "attrib", \
+ "Forces, that all attributes are set to this vector." )
+
+#:def_opt( "DEF_ATTRIB", "def-attrib|defattrib", "CP", \
+ "attrib", \
+ "Define the default attributes for BMG files. If not set, the default" \
+ " attributes are estimated. On text output, strings with default" \
+ " attributes are printed without attribute vector. The usual default" \
+ " attribute for MKW is @[1]@." )
+
+#:def_opt( "NO_ATTRIB", "no-attrib|noattrib", "C", \
+ "", \
+ "Suppress the output of any BMG attributes if creating BMG text files." )
+
+#:def_opt( "X_ESCAPES", "x-escapes|xescapes", "C", \
+ "", \
+ "Use \\x{{} escapes instead of \\z{{} escapes." )
+
+#:def_opt( "OLD_ESCAPES", "old-escapes|oldescapes", "C", \
+ "", \
+ "To be compatible with v1.43 and earlier, print 1A escape sequences" \
+ " with total size of >12 bytes as single words using \\x{{}. Also" \
+ " don't use \\x{{} and \\u{{} with parameter lists." )
+
+#:def_opt( "SINGLE_LINE", "1|single-line|singleline", "C", \
+ "", \
+ "If set, don't print continuation lines for BMG text output. If set" \
+ " twice, print only single text lines and suppress attributes like" \
+ " option {--no-attrib} does it." )
+
+#:def_opt( "NO_BMG_COLORS", "no-bmg-colors|nobmgcolors", "C", \
+ "", \
+ "If set, suppress the output of '\\c{{color}' escape sequences for" \
+ " colors definitions in BMG text output to be compatible with old" \
+ " versions of the tools." )
+
+#:def_opt( "BMG_COLORS", "bmg-colors|bmgcolors", "C", \
+ "", \
+ "Force output of '\\c{{color}' escape sequences with names, even for" \
+ " foreign (not MKWii) BMG files." )
+
+#:def_opt( "NO_BMG_INLINE", "no-bmg-inline|nobmginline", "C", \
+ "", \
+ "Print BMG attributes as separate line before the message definition" \
+ " to be compatible with versions until v1.39. The output for the" \
+ " standard value 0x01000000 is always suppressed. This was the default" \
+ " until v1.43." )
+
+#:def_opt( "EXPORT", "X|export", "C", \
+ "", \
+ "Enable the export mode and create small and machine readable text" \
+ " files for easy post processing. The option works similar like" \
+ " @-HBl11@ for BMG text files." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "POINTS", "POINTS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "POINTS", "BRIEF", \
+ "", \
+ "Print the table as comma separated lists in C notation." )
+
+#:def_cmd_opt( "POINTS", "LONG", \
+ "", \
+ "Append a string in {--points} format that defines the table. If set" \
+ " twice, append up to 3 strings in different modes." )
+
+#:def_cmd_opt( "EXTRACT", "NO_HEADER", \
+ "", \
+ "Exclude the section header from output." )
+
+#:def_cmd_opt( "SECTIONS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SLOTS", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "LONG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "LONG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MIX", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "LE_CODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "CT_CODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "LONG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "IDENTIFIER", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "LONG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LONG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIGN", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wctct' ###############
+###############################################################################
+
+#:def_tool( "wctct", \
+ "wctct [option]... command [option|parameter|@file]...", \
+ "Wiimms CT-CODE Tool : Manage the $CT-CODE$ extension. BRRES, TEX0," \
+ " CT-CODE, CT-TEXT and LE-BIN files are accepted as input." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wctct VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wctct HELP [--width=wd] OPT|OPTION ...\n" \
+ "wctct HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wctct HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wctct HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wctct ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wctct TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wctct COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wctct ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wctct FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wctct FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wctct SYMBOLS", \
+ "Print predefined symbols of text parser to standard output. The" \
+ " CT-CODE specific symbols are included." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wctct FUNCTIONS [key]...", \
+ "Print a list with all parser functions including the CT-CODE specific" \
+ " functions. If one key ore more key entered, then only functions that" \
+ " match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wctct CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wctct FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "DUMP", "D|DUMP", \
+ "wctct DUMP [source]...", \
+ "Print an information dump for the CT-CODE of each source file. BRRES," \
+ " TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as input." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wctct CAT [source]...", \
+ "Read the source files and print the CT-CODE part them as decoded text" \
+ " files to standard output. The output of all source files is" \
+ " concatenated. BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted" \
+ " as input." )
+
+#:def_cmd( "BMG", "BMG", \
+ "wctct BMG [source]...", \
+ "Read the source files and print a BMG message listing to standard" \
+ " output. BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as" \
+ " input." )
+
+#:def_cmd( "TRACKS", "TRACKS", \
+ "wctct TRACKS [source]...", \
+ "Read the source files and print a track listing to standard output." \
+ " BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as input." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wctct DECODE [source]...", \
+ "Read the source files and decode them to CT-TEXT files. The default" \
+ " destination is @'%P/%N.txt'@. BRRES, TEX0, CT-CODE, CT-TEXT and" \
+ " LE-BIN are accepted as input." )
+
+#:def_cmd( "CREATE", "CREATE|C", \
+ "wctct CREATE keyword [source]...", \
+ "Read the source files, scan the CT-CODE part and create an output" \
+ " file controlled by the keyword. BRRES, TEX0, CT-CODE, CT-TEXT and" \
+ " LE-BIN files are accepted as input. Possible keywords are: @CUP1," \
+ " CRS1, r-MOD1, r-MOD2, r-OVR1, r-BAD1CODE, r-BAD1DATA (=r-CODE)," \
+ " r-TEX0, r-BRRES, r-SZS, BMG, TRACKS, LIST, REF@ and @FULL@. 'r'" \
+ " defines the region and is one of @EU, RMCP, US, RMCE, JP, RMCJ, KO@" \
+ " or @RMCK@.\n" \
+ " The Korean support needs external CT-CODE files. Use option" \
+ " {--ct-dir} to define at least one search path." )
+
+#:def_cmd( "PATCH", "PATCH|P", \
+ "wctct PATCH [source]...", \
+ "Read each source file, find and scan the CT-CODE part and patch it." \
+ " BRRES, TEX0, CT-CODE, CT-TEXT and LE-BIN are accepted as input." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "Enable LE-CODE and CT-CODE support. The optional parameter is" \
+ " deprecated and ignored." )
+
+#:def_opt( "OLD_SPINY", "old-spiny|oldspiny", "G", \
+ "", \
+ "Disable the new feature to hold a Spiny Shell at the tail." )
+
+#:def_opt( "CRS1", "crs1", "GP", \
+ "value", \
+ "Store this value into all 8 members of the property array of the CRS1" \
+ " header if reading a CT-TEXT. The default value is 0x800." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Suppress cross reference comments." )
+
+#:def_opt( "RAW", "raw", "C", \
+ "", \
+ "Print BMG messages as UTF-8 text without escape sequences." )
+
+#:def_opt( "BMG_ENCODING", "bmg-encoding|bmgencoding", "CP", \
+ "name", \
+ "Force a BMG encoding for new BMG files. Accepted encoding names are:" \
+ " @CP-1252@, @UTF-16BE@ (or @UTF-16@), @SHIFT-JIS@, @UTF-8@ and @AUTO@" \
+ " for automatic detection (default). Same keywords without minus signs" \
+ " are accepted too.\n" \
+ " Mario Kart Wii uses encoding @UTF-16BE@; the default if no other" \
+ " encoding is defined." )
+
+#:def_opt( "BMG_INF_SIZE", "bmg-inf-size|bmginfsize", "CP", \
+ "size", \
+ "Defines the 'INF1' size of new BMG files between 4 and 1000. The" \
+ " first 4 bytes of a INF1 record is an offset into the string pool and" \
+ " the remaining bytes the attributes. Maximal 40 attribute bytes are" \
+ " supported and additional bytes are assumed to be NULL. All BMG files" \
+ " of MKW have a size of 8." )
+
+#:def_opt( "BMG_MID", "bmg-mid|bmgmid", "CO", \
+ "[mode]", \
+ "Control the creation of BMG section @MID1@. Suppress the creation, if" \
+ " mode is @OFF@. Force the creation, if mode is @ON@. On mode @AUTO@" \
+ " (default), the source is analysed for the decision." )
+
+#:def_opt( "FORCE_ATTRIB", "force-attrib|forceattrib", "CP", \
+ "attrib", \
+ "Forces, that all attributes are set to this vector." )
+
+#:def_opt( "DEF_ATTRIB", "def-attrib|defattrib", "CP", \
+ "attrib", \
+ "Define the default attributes for BMG files. If not set, the default" \
+ " attributes are estimated. On text output, strings with default" \
+ " attributes are printed without attribute vector. The usual default" \
+ " attribute for MKW is @[1]@." )
+
+#:def_opt( "NO_ATTRIB", "no-attrib|noattrib", "C", \
+ "", \
+ "Suppress the output of any BMG attributes if creating BMG text files." )
+
+#:def_opt( "X_ESCAPES", "x-escapes|xescapes", "C", \
+ "", \
+ "Use \\x{{} escapes instead of \\z{{} escapes." )
+
+#:def_opt( "OLD_ESCAPES", "old-escapes|oldescapes", "C", \
+ "", \
+ "To be compatible with v1.43 and earlier, print 1A escape sequences" \
+ " with total size of >12 bytes as single words using \\x{{}. Also" \
+ " don't use \\x{{} and \\u{{} with parameter lists." )
+
+#:def_opt( "SINGLE_LINE", "1|single-line|singleline", "C", \
+ "", \
+ "If set, don't print continuation lines for BMG text output. If set" \
+ " twice, print only single text lines but not value lines." )
+
+#:def_opt( "NO_BMG_COLORS", "no-bmg-colors|nobmgcolors", "C", \
+ "", \
+ "If set, suppress the output of '\\c{{color}' escape sequences for" \
+ " colors definitions in BMG text output to be compatible with old" \
+ " versions of the tools." )
+
+#:def_opt( "BMG_COLORS", "bmg-colors|bmgcolors", "C", \
+ "", \
+ "Force output of '\\c{{color}' escape sequences with names, even for" \
+ " foreign (not MKWii) BMG files." )
+
+#:def_opt( "NO_BMG_INLINE", "no-bmg-inline|nobmginline", "C", \
+ "", \
+ "Print BMG attributes as separate line before the message definition" \
+ " to be compatible with versions until v1.39. The output for the" \
+ " standard value 0x01000000 is always suppressed. This was the default" \
+ " until v1.43." )
+
+#:def_opt( "EXPORT", "X|export", "C", \
+ "", \
+ "Enable the export mode and create small and machine readable text" \
+ " files for easy post processing. The option works similar like @-HB@" \
+ " for CT-CODE output." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "NO_CHECK", "N|no-check|nocheck", "C", \
+ "", \
+ "Do not make plausibility checks for KCL and KMP files." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "LIST", "list", "C", \
+ "", \
+ "Cancel all previous {--rel} and {--full} and enter LIST mode" \
+ " (default) for text output.\n" \
+ " In LIST mode only a track list is generated. On scanning the tracks" \
+ " are automatically distributed to the cups. This makes rearanging" \
+ " very simple." )
+
+#:def_opt( "REF", "ref", "C", \
+ "", \
+ "Cancel all previous {--list} and {--full} and enter REFERENCE mode" \
+ " for text output.\n" \
+ " In REFERENCE mode all tracks and cups are printed separately. After" \
+ " scanning the cup and track layout is the same as the original code" \
+ " file." )
+
+#:def_opt( "FULL", "full", "C", \
+ "", \
+ "Cancel all previous {--list} and {--rel} and enter FULL mode for text" \
+ " output.\n" \
+ " FULL mode is a combination of LIST and REF modes." )
+
+#:def_opt( "HEX", "hex", "C", \
+ "", \
+ "Normally and if available, names are printed for music and property" \
+ " slots. If this option is set, hex numbers are printed always." )
+
+#:def_opt( "CT_DIR", "ct-dir|ctdir", "GP", \
+ "dir", \
+ "Define a search directory for CT-CODE parts and use the internal" \
+ " copies only, if no valid file is found. Each file is searched" \
+ " without and then with extension '.bz2'. For both cases bzip2 files" \
+ " are detected and decompressed. Only files with correct file type are" \
+ " accepted.\n" \
+ " wctct will search in the sub directory @'rmc[pujk]/'@ for files" \
+ " @'mod1.bin', 'mod2.bin', 'ovr1.bin'@ and @'bad1code.bin'@.\n" \
+ " Use this option multiple times to define more than one search" \
+ " directory." )
+
+#:def_opt( "CT_LOG", "ct-log|ctlog", "GO", \
+ "[=level]", \
+ "Define a log level for option {--ct-dir}. Without parameter, the" \
+ " current level is increased. Allowed keywords are: 0=0FF, 1=SUCCESS," \
+ " 2=FOUND, 3=ALL" )
+
+#:def_opt( "ALLOW_SLOTS", "allow-slots|allowslots", "GP", \
+ "list", \
+ "Allow and disallow slots for automatic slot assigning. A comma" \
+ " separated list of slots (A), slot ranges (A:B) or keywords is" \
+ " expected. If preceded by a minus sign, the slots are disabled. The" \
+ " keywords are: @TRACKS@ (slots 0:0x1f), @ARENAS@ (0x20:0x29) and" \
+ " @SPECIAL@ (0x36:0x3a). @CTCODE@ is an abbreviation for" \
+ " @ARENAS,SPECIAL@.\n" \
+ " The default is to enable slot ranges @0x00:0x1f@, @0x2a:0x35@," \
+ " @0x3b:0x41@ and @0x44:0xfe@." )
+
+#:def_opt( "IMAGES", "images", "CP", \
+ "dir", \
+ "If creating a CT-CODE BRRES or SZS file, then search the 8 strap" \
+ " images in the specified directory. The images are searched with" \
+ " extensions .png, .tex, .tex0 and without extension in this order" \
+ " until a valid image is found. All images will be resized to the" \
+ " correct width and height and converted to format TEX.RGB565 without" \
+ " mipmaps. If no valid image is found, a hard coded default image is" \
+ " used." )
+
+#:def_opt( "LOAD_BMG", "load-bmg|loadbmg", "CMP", \
+ "file", \
+ "Load immediately the file to fill an internal message pool. The" \
+ " option can be used multiple times to fill the message pool by" \
+ " different sources. A later message overrides the previous message.\n" \
+ " The internal message pool is patched by all {--patch-bmg} options." )
+
+#:def_opt( "PATCH_BMG", "patch-bmg|patchbmg|pb", "CMP", \
+ "mode[cond][=param]", \
+ "This option specifies a BMG patch mode. Some of the modes need a" \
+ " parameter or a file name of a BMG patch file (raw or text BMG), both" \
+ " separated by an equal sign. Modes with required file names are" \
+ " @PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL@ and" \
+ " @NOTEQUAL@. Modes with text parameter are @FORMAT@, @REGEXP@ and" \
+ " @RM-REGEXP@. Standalone modes are @ID, ID-ALL, UNICODE, RM-ESCAPES," \
+ " RM-CUPS, CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY," \
+ " LE-FILL, X-COPY, X-FORCE-COPY@ and @X-FILL@. Unique abbreviations" \
+ " are allowed.\n" \
+ " The optional condition @COND@ is either '@?MID@' or '@!MID@'. In" \
+ " case of '@?MID@', the patch is only applied if the message id MID" \
+ " already exists. In case of '@!MID@', the patch is only applied if" \
+ " the message id MID does not exists.\n" \
+ " If this option is used multiple times, all patch files will be" \
+ " processed in the entered order." )
+
+#:def_opt( "MACRO_BMG", "macro-bmg|macrobmg|mb", "CMP", \
+ "file", \
+ "Load a BMG file and add the messages to the macro library; already" \
+ " existing entries are replaced. The macro library is accessed by" \
+ " escape sequence @\\m{{MID}@ as fallback, if the active file has not" \
+ " already defined the message @MID@ by itself." )
+
+#:def_opt( "FILTER_BMG", "filter-bmg|filterbmg|fb", "CMP", \
+ "list", \
+ "If this option is set, the BMG messages are filtered by this list." \
+ " Only enabled messages are exported to the output BMG file (binary or" \
+ " text).\n" \
+ " The parameter is a list of message ids (short MID, 'Txx' or 'Uxx'" \
+ " or Mxx' or hex number) or message ranges (MID:MID) or one of the" \
+ " keywords @NONE, IDENT (=ID), PARAM, CUPS, TRACKS, ARENAS, CHAT," \
+ " CTCODE (=CT), CTUPS, CTTRACKS, CTARENAS, CTREFS, LECODE (=LE)," \
+ " LEUPS, LETRACKS, LEARENAS, LEREFS, XCODE (=X), XUPS, XTRACKS," \
+ " XARENAS, XREFS, ALLCODE, ALLUPS, ALLTRACKS, ALLARENAS, ALLREFS," \
+ " GENERIC@ or @ALL@. If an element is preceded by a minus sign, it is" \
+ " removed from the filter list (disabled).\n" \
+ " With v2.01a, this option was renamed from --msg to the more" \
+ " meaningful name --filter-bmg. The old name is still available." )
+
+#:def_opt( "PATCH_NAMES", "patch-names|patchnames", "C", \
+ "", \
+ "If set, the names of the CUP1 and CSR1 sections are patched by the" \
+ " loaded BMG files directly after loading the source files." )
+
+#:def_opt( "ORDER_BY", "order-by|orderby|order", "CP", \
+ "bmg", \
+ "Load the BMG file and filter track names. Then before creating output" \
+ " files, re-distribute the tracks of the additonal cups (9-) to the" \
+ " same cups by the order of the read track names. Tracks without BMG" \
+ " reference are placed at the end of all tracks. This option modifes" \
+ " only the track order of the cups, but will not change any name." )
+
+#:def_opt( "ORDER_ALL", "order-all|orderall", "C", \
+ "", \
+ "Used together with option {--order-by}: Re-distribute the tracks of" \
+ " all cups beginning with Mushroom Cup." )
+
+#:def_opt( "WRITE_TRACKS", "write-tracks|writetracks|wtracks", "CP", \
+ "file", \
+ "Create a machine readable file reflecting the racing track" \
+ " distribution to the cups. One line of format @'IDX|MID|NAME'@ is" \
+ " written for each track. --wtracks is a short cut." )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "RAWDUMP", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "RAWDUMP", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LONG", \
+ "", \
+ "Print headers as hexdump." )
+
+#:def_cmd_opt( "DUMP", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ORDER_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "LIST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "REF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "FULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "HEX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in CTC text files." )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "WRITE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ORDER_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BRIEF", \
+ "", \
+ "Filter the message by tracks, that are used a racing track. If set" \
+ " twice, suppress also tracks created by the 'N' command of CT-TEXT" \
+ " files. If set 3 times, suppress always the output of first 32" \
+ " tracks." )
+
+#:def_cmd_opt( "BMG", "LONG", \
+ "", \
+ "Normally, only the track and arena names are exported. The message id" \
+ " (MID) range is 4000-40FF. If set, cup names are exported too as MID" \
+ " 4200-423F. If set twice, cup/track relations are also exported as" \
+ " MID 4300-43FF." )
+
+#:def_cmd_opt( "BMG", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "LIST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "REF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "FULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "HEX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in CTC text files." )
+
+#:def_cmd_opt( "BMG", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "WRITE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BMG", "ORDER_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "NO_HEADER", \
+ "", \
+ "Suppress the table header." )
+
+#:def_cmd_opt( "TRACKS", "BRIEF", \
+ "", \
+ "Suppress the output of the music and property slots." )
+
+#:def_cmd_opt( "TRACKS", "LONG", \
+ "", \
+ "Include the first 32 standard tracks into the output. If set twice," \
+ " also include the battle arenas." )
+
+#:def_cmd_opt( "TRACKS", "RAW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "LIST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "REF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "FULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "HEX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "WRITE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "ORDER_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "WRITE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "LIST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "FULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "HEX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in CTC text files." )
+
+#:def_cmd_opt( "DECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ORDER_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "WRITE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "HEX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in CTC text files." )
+
+#:def_cmd_opt( "CREATE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BMG_ENCODING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BMG_INF_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BMG_MID", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "FORCE_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEF_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_ATTRIB", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "X_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "OLD_ESCAPES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "SINGLE_LINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "BMG_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_BMG_INLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LONG", \
+ "", \
+ "BMG: Normally, only the track and arena names are exported. The" \
+ " message id (MID) range is 4000-40FF. If set, cup names are exported" \
+ " too as MID 4200-423F. If set twice, cup/track relations are also" \
+ " exported as MID 4300-43FF." )
+
+#:def_cmd_opt( "CREATE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "CT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "CT_LOG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ALLOW_SLOTS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "IMAGES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ORDER_ALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "WRITE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LOAD_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PATCH_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MACRO_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "FILTER_BMG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PATCH_NAMES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ORDER_BY", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ORDER_ALL", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wimgt' ###############
+###############################################################################
+
+#:def_tool( "wimgt", \
+ "wimgt [option]... command [option|parameter|@file]...", \
+ "Wiimms Image Tool : Extract and convert graphic images. The file" \
+ " formats TPL, TEX, BTI, BREFT and PNG are supported." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wimgt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wimgt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wimgt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wimgt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wimgt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wimgt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wimgt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wimgt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wimgt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wimgt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wimgt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "LIST", "LIST|LS", \
+ "wimgt LIST [source]...", \
+ "List images files and print file and image type." )
+
+#:def_cmd( "LIST_L", "LIST-L|LL|LISTL", \
+ "wit LIST-L [source]...", \
+ "List images files and print file and image type and geometry data." \
+ " 'LIST-L' is a short cut for {LIST --long}." )
+
+#:def_cmd( "LIST_LL", "LIST-LL|LLL|LISTLL", \
+ "wit LIST-LL [source]...", \
+ "List images files and print file and image type and advanced geometry" \
+ " data. 'LIST-LL' is a short cut for {LIST --long --long}." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wimgt DECODE [source]...", \
+ "Decode (export) the entered image files into PNG files. The default" \
+ " destination is @'%P/%F.png'@." )
+
+#: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)." )
+
+#: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." )
+
+#:def_cmd( "COPY", "COPY|CP", \
+ "wimgt COPY source dest\n" \
+ "wimgt COPY source... [-d|-D] dest", \
+ "Copy and convert an image from 'source' to 'dest'. Multiple sources" \
+ " can be used, if 'dest' is a directory or contains at least one" \
+ " %-pattern.\n" \
+ " 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." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "Enable LE-CODE and CT-CODE support. The optional parameter is" \
+ " deprecated and ignored." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Create smaller output." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "ALL", "a|all", "C", \
+ "", \
+ "Convert all files and not only the files with changed file or image" \
+ " formats." )
+
+#:def_opt( "MIPMAPS", "mipmaps", "C", \
+ "", \
+ "If reading a source, scan for mipmaps and load them too. For PNG" \
+ " files, files named @NAME.mm#.EXT@ with #=1.. are searched. This is" \
+ " the default. @--mm@ is a short cut." )
+
+#:def_opt( "NO_MIPMAPS", "no-mipmaps|nomipmaps|no-mm|nomm", "C", \
+ "", \
+ "If reading a source, ignore mipmaps. This disables not the creation" \
+ " of mipmaps (see {-n-mipmaps}). @--no-mm@ is a short cut." )
+
+#:def_opt( "N_MIPMAPS", "n-mipmaps|nmipmaps|n-mm|nmm", "CP", \
+ "num", \
+ "Force the number of mipmaps. Values between 0 and 20 are allowed." \
+ " Value @OFF@ (default) disables this option. If enabled, options" \
+ " @--max-mipmaps@ and @--mipmap-size@ are ignored. The creation of" \
+ " mipmaps stops if the width or the height of the mipmap becomes 0." \
+ " @--n-mm@ is a short cut." )
+
+#:def_opt( "MAX_MIPMAPS", "max-mipmaps|maxmipmaps|max-mm|maxmm", "CP", \
+ "num", \
+ "Control the automatic mipmap creation. Values between 0 and 20 are" \
+ " allowed and the default is 4. The mipmap creation for an image" \
+ " stops, if the set number is reached. This option is ignored, if" \
+ " @--n-mipmaps@ is enabled. @--max-mm@ is a short cut." )
+
+#:def_opt( "MIPMAP_SIZE", "mipmap-size|mipmapsize|mm-size|mmsize", "CP", \
+ "num", \
+ "Define the minimal width and minimal height of a generated mipmap." \
+ " Any value >0 is allowed. The default is 8. This option is ignored," \
+ " if @--n-mipmaps@ is enabled. @--mm-size@ is a short cut." )
+
+#:def_opt( "FAST_MIPMAPS", "fast-mipmaps|fastmipmaps|fast-mm|fastmm", "C", \
+ "", \
+ "If resizing an image, use the old fast resize algorithm (default" \
+ " until v1.64a) instead of the new smart one. Both algorithms differ" \
+ " only, when creating a mipmap for images with odd width or odd" \
+ " height. The old algorithm is faster (factor 2-4) than the default" \
+ " algorithm, but the new algorithm creates better resized images." \
+ " @--fast-mm@ is a short cut." )
+
+#:def_opt( "CMPR_DEFAULT", "cmpr-default", "CP", \
+ "rgb1[,rgb2]", \
+ "Define 2 colors for the case, that all 16 pixels of a CMPR block are" \
+ " transparent. The default is to calculate an average color of all" \
+ " transparent pixels. Before v2.04 white was used.\n" \
+ " 2 RGB values (hex values with 6 digits each) are expected as" \
+ " parameter. If optional @RGB2@ is missed, a copy of @RGB1@ is used." \
+ " As first step, both colors are converted to RGB565 colors @C1@ and" \
+ " @C2@ and sorted, so that @C1<C2@ (mandatory for CMPR). If @C1@ and" \
+ " @C2@ are identical, the least significant bit of green is cleared" \
+ " for @C1@ and set for @C2@.\n" \
+ " Use parameter '@0@' to force black, '@-1@' to force white, or '@-@'" \
+ " to reset to auto calculation." )
+
+#:def_opt( "PRE_CONVERT", "pre-convert|preconvert", "C", \
+ "", \
+ "Convert the image before the image format for the destination file is" \
+ " selected. This results in a perhaps worser graphic and is only" \
+ " useful to control graphic conversions." )
+
+#:def_opt( "PATCH", "P|patch", "CMP", \
+ "mode1.mode2...=file", \
+ "This option specifies patch mode list and a file, separated by an" \
+ " equal sign. Mode is a point separated list of the keywords: @TOP@" \
+ " (@T@), @BOTTOM@ (@B@), @VCENTER@ (@V@), @INS-TOP@ (@IT@) and" \
+ " @INS-BOTTOM@ (@IB@) for the vertical alignment, @LEFT@ (@L@)," \
+ " @RIGHT@ (@R@), @HCENTER@ (@H@), @INS-LEFT@ (@IL@) and @INS-RIGHT@" \
+ " (@IR@) for the horizontal alignment, @COPY@ (@CP@), @BACKGROUND@" \
+ " (@BG@), @FOREGROUND@ (@FG@) and @MIX@ (@MX@) as color calculation" \
+ " 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." )
+
+#:def_opt( "TRANSFORM", "x|transform", "CP", \
+ "list", \
+ "Convert image formats. A comma separated list with terms is expected." \
+ " A term have the syntax @'[SRC=]DEST'@. It means: convert @SRC@" \
+ " format into @DEST@ format. If @SRC=@ is not set, the destination" \
+ " format is used 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 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@" \
+ " (import). Allowed image formats are: @I4, I8, IA4, IA8, RGB565" \
+ " (=R565), RGB5A3 (=R3), RGBA32 (=R32), C4, C8, C14X2, CMPR@. Allowed" \
+ " palette formats are: @P-IA8 (=P8), P-RGB565 (=P565), P-RGB5A3" \
+ " (=P3)@. Attributtes are @PALETTE@, @NO-PALETTE@, @GRAY@, @COLOR@," \
+ " @ALPHA@ and @NO-ALPHA@.\n" \
+ " All terms are managed as list. For each graphic the list is" \
+ " iterated until the first SRC tuple of a term matches the graphic." \
+ " Then the destination tuple is used for the transformation.\n" \
+ " The command {wimgt TEST} prints a clearly arranged readable table" \
+ " as result of this option." )
+
+#:def_opt( "STRIP", "strip", "C", \
+ "", \
+ "If creating a PNG file, don't add comments about creator and source" \
+ " formats." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "LONG", \
+ "", \
+ "If set, geometry data of the image is printed. If set twice, advanced" \
+ " geometry data is printed." )
+
+#:def_cmd_opt( "LIST", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "LONG", \
+ "", \
+ "If set, geometry data of the image is printed. If set twice, advanced" \
+ " geometry data is printed." )
+
+#:def_cmd_opt( "LIST_L", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_L", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "LONG", \
+ "", \
+ "If set, geometry data of the image is printed. If set twice, advanced" \
+ " geometry data is printed." )
+
+#:def_cmd_opt( "LIST_LL", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST_LL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRE_CONVERT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PATCH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ALL", \
+ "", \
+ "If source and destination file are the same, the file is only written" \
+ " on modifications (transform, patch, ...). If --all is set, then the" \
+ " file is always written." )
+
+#:def_cmd_opt( "ENCODE", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRE_CONVERT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PATCH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "ALL", \
+ "", \
+ "If source and destination file are the same, the file is only written" \
+ " on modifications (transform, patch, ...). If --all is set, then the" \
+ " file is always written." )
+
+#:def_cmd_opt( "CONVERT", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "PRE_CONVERT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "PATCH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CONVERT", "STRIP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ALL", \
+ "", \
+ "If source and destination file are the same, the file is only written" \
+ " on modifications (transform, patch, ...). If --all is set, then the" \
+ " file is always written." )
+
+#:def_cmd_opt( "COPY", "N_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "MAX_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "MIPMAP_SIZE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PRE_CONVERT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PATCH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NO_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "FAST_MIPMAPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "CMPR_DEFAULT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRANSFORM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "STRIP", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wkclt' ###############
+###############################################################################
+
+#:def_tool( "wkclt", \
+ "wkclt [option]... command [option|parameter|@file]...", \
+ "Wiimms KCL Tool : Analyze, modify, export and create KCL and OBJ" \
+ " files." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wkclt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wkclt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wkclt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wkclt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wkclt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wkclt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wkclt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wkclt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wkclt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wkclt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wkclt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wkclt SYMBOLS", \
+ "Print predefined symbols of text parser to standard output. The KCL" \
+ " specific symbols are included." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wkclt FUNCTIONS [key]...", \
+ "Print a list with all parser functions including the KCL specific" \
+ " functions. If one key ore more key entered, then only functions that" \
+ " match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wkclt CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "MATRIX", "MATRIX", \
+ "wkclt MATRIX [patch-option]... [vector]...", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results.", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results. The transformations are done with 4" \
+ " different methods to confirm the algorithms. Only the main results" \
+ " and results, which differ, are printed.\n" \
+ " Normally, the exit status is @OK@ (null). If at least one old" \
+ " transformation returns different results for the different" \
+ " algorithms, then status @DIFFER@ (not null) is returned." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wkclt FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wkclt CAT source...", \
+ "Read the entered KCL and OBJ files and print them as OBJ files to" \
+ " standard output. The output of all source files is concatenated.\n" \
+ " Automated dropping of bad KCL triangles is enabled if no other drop" \
+ " option is specified by option {--kcl}." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wkclt DECODE source...", \
+ "Read the entered KCL and OBJ files and export them to OBJ files. The" \
+ " default destination is @'%P/%N.txt'@.\n" \
+ " Automated dropping of bad KCL triangles is enabled if no other drop" \
+ " option is specified by option {--kcl}." )
+
+#:def_cmd( "ENCODE", "ENCODE|ENC", \
+ "wkclt ENCODE source...", \
+ "Read the entered KCL and OBJ files and encode (compile) them to" \
+ " binary KCL files. The default destination is @'%P/%N.kcl'@.\n" \
+ " See https://szs.wiimm.de/doc/kcl for encoding details." )
+
+#:def_cmd( "COPY", "COPY|CP", \
+ "wkclt COPY source dest\n" \
+ "wkclt COPY source... [-d|-D] dest", \
+ "Copy and convert a collision file from 'source' to 'dest'. Multiple" \
+ " KCL and OBJ sources can be used, if 'dest' is a directory or" \
+ " contains at least one %-pattern.\n" \
+ " This is an alternative for the DECODE and ENCODE commands. The" \
+ " default destination file format is selected by scanning the file" \
+ " extension of the destination. Is it '.kcl', a binary KCL file is" \
+ " created. Is it '.txt' or '.obj', an OBJ file is created. Otherwise" \
+ " the output format is the same as the source.\n" \
+ " Automated dropping of bad KCL triangles is enabled if no other drop" \
+ " option is specified and the destination is an OBJ file." )
+
+#:def_cmd( "CFF", "CFF", \
+ "wkclt CFF source...", \
+ "CFF is an abbreviation of 'create flag file' and will create a flag" \
+ " file template for each entered source file. If the flag file already" \
+ " exists, only missing group names are added at the end of file." )
+
+#:def_cmd( "FLAGS", "FLAGS|F", \
+ "wkclt FLAGS source...", \
+ "Print a KCL type and flag usage statistic for each source to standard" \
+ " output." )
+
+#:def_cmd( "DUMP", "DUMP|D", \
+ "wkclt DUMP source...", \
+ "This debugging command prints an information dump about the internal" \
+ " triangle data base and the octree in human and machine readable text" \
+ " format. The output of all source files is concatenated and printed" \
+ " to standard output." )
+
+#:def_cmd( "DBRIEF", "DBRIEF|DB", \
+ "wkclt DBRIEF source...", \
+ "Command @DBRIEF@ is a short cut for {DUMP --brief}. The output of the" \
+ " triangle list is suppressed and only the header data and statistics" \
+ " are printed." )
+
+#:def_cmd( "LIST", "LIST", \
+ "wkclt LIST source...", \
+ "This debugging command prints a list of all triangles with metrics in" \
+ " human and machine readable text format. It is like DUMP, but reduced" \
+ " to the list of triangles. The output of all source files is" \
+ " concatenated and printed to standard output." )
+
+#:def_cmd( "TRIANGLES", "TRIANGLES", \
+ "wkclt TRIANGLES source...", \
+ "This debugging commands prints one data line for each triangle. The" \
+ " goal is to compare data. Therefor and to create smaller lines the" \
+ " precision of the floating points numbers is reduced.\n" \
+ " The print order is: flag used length | 3 points | 4 normals. For" \
+ " each point and normal 3 coordinates are printed." )
+
+#:def_cmd( "TRAVERSE", "TRAVERSE", \
+ "wkclt TRAVERSE source point...", \
+ "For each point, the octree of the source file is traversed to find" \
+ " and print the related triangles. A point is either a comma separated" \
+ " list with 3 parser expressions (one for each coordinate) or a vector" \
+ " expression." )
+
+#:def_cmd( "FALL", "FALL", \
+ "wkclt FALL source point...", \
+ "For each entered point, the lowest point is searched, that can be" \
+ " reached without collision. The point is expanded to a cube with edge" \
+ " length of 100.0 for the collision tests." )
+
+#:def_cmd( "CHECK", "CHECK|CHK", \
+ "wkclt CHECK source...", \
+ "Read the entered KCL files (text or binary) and and make a" \
+ " plausibility check. Hints and warnings are written to standard" \
+ " output. The exit status is @'DIFFER'@ if at least one KMP warning" \
+ " found." )
+
+#:def_cmd( "BLOW", "BLOW", \
+ "wkclt BLOW source...", \
+ "Try to calculate the used blow size (KCL_BLOW) of a KCL. Print one" \
+ " line for each source file." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "Enable LE-CODE and CT-CODE support. The optional parameter is" \
+ " deprecated and ignored." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "SCALE", "scale", "CP", \
+ "vector[@origin]", \
+ "Transform the data: Scale all coordinates and size values by 'vector'" \
+ " relative to the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Negative values mirror the coordinates. Each parameter is either a" \
+ " vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "SHIFT", "shift", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--translate}, but the addition is done before rotation. The" \
+ " parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XSS", "xss", "CP", \
+ "x1old,x1new,x2old,x2new", \
+ "--xss (x-scale-shift) calculates the X values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "YSS", "yss", "CP", \
+ "y1old,y1new,y2old,y2new", \
+ "--yss (y-scale-shift) calculates the Y values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ZSS", "zss", "CP", \
+ "z1old,z1new,z2old,z2new", \
+ "--zss (z-scale-shift) calculates the Z values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ROT", "rot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes" \
+ " through the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y,z').\n" \
+ " Option --rot is an alternative for {--xrot}, {--yrot} and {--zrot}" \
+ " to define all 3 rotations in one step. Transformations are" \
+ " calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XROT", "xrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('y,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "YROT", "yrot|hrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead. This is" \
+ " a horizontal counterclockwise rotation and the old option name" \
+ " --hrot can also used.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "ZROT", "zrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the z-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "TRANSLATE", "translate", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--shift}, but the addition is done after rotation. The parameter is" \
+ " either a vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z'). @--trans@ is a short cut.\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "NULL", "null", "C", \
+ "", \
+ "Create a neutral transformation without affecting the coordinates." \
+ " The only influence is, that the dependent values (like maximum) are" \
+ " re-calculated as if a transformation has taken place." )
+
+#:def_opt( "NEXT", "next", "C", \
+ "", \
+ "Close the current transformation step with all scaling, shifting," \
+ " rotation and translation options and open a new step with cleared" \
+ " options. On transformation each step is logical done one by one. In" \
+ " real, one total transformation matrix is calculated and used for" \
+ " fast transformations.\n" \
+ " If option --next is used, the ability for modifying the scale and" \
+ " rotation vectors (not the positions) of different KMP sections is" \
+ " nearly always lost. A warning is printed if this occurs." )
+
+#:def_opt( "ASCALE", "ascale", "CP", \
+ "factor@dir", \
+ "Transform the data and do an axis scale: Close the current" \
+ " transformation step like {--next} and scale the data by @'factor'@" \
+ " into the direction given by the vector @'dir'@. Store the resulting" \
+ " matrix as single transformation step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "AROT", "arot", "CP", \
+ "degree[@pos1]@pos2", \
+ "Transform the data and do an axis rotation: Close the current" \
+ " transformation step like {--next} and rotate the data by @'degree'@" \
+ " around the axis defined by the 2 points. If @'pos1'@ is not set, use" \
+ " @0,0,0@ instead. Store the resulting matrix as single transformation" \
+ " step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "TFORM_SCRIPT", "tform-script|tformscript", "CP", \
+ "script", \
+ "Load the script and execute it by the text parser.\n" \
+ " Then for each coordinate (2D and 3D), call the macro @TRANSFORM@" \
+ " after all other transformations. Call it without parameters and set" \
+ " variable @$$I@ with a zero based index of all vertices, variable" \
+ " @$$D@ to the dimension (2 or 3) and the variable @$$P@ to the vector" \
+ " of the current vertex. If the macro returns a vector, it is the new" \
+ " position.\n" \
+ " For each file, macro @BEGIN@ is called at the beginning and @END@" \
+ " after processing all points, but only, if the macros are defined." \
+ " For @END@, variable @$$I@ is set to the number of processed vertices" \
+ " in the current file.\n" \
+ " Before each macro call, the private and local variables are cleared" \
+ " and only global parameters are permanent. The zero based index is" \
+ " cleared for each new source. The parameters of the macro calls are" \
+ " defined in the local name space." )
+
+#:def_opt( "KCL", "kcl", "GP", \
+ "list", \
+ "Set global options for KCL processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. Keywords @SMALL, MEDIUM@ and @CHARY@ select the default" \
+ " parameters for the octree creation. The other allowed keywords are:" \
+ " @FAST, NEW, CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP," \
+ " G, USEMTL, CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED," \
+ " DROP-FIXED, DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL," \
+ " CONV-FACEUP, WEAK-WALLS, SORT, INPLACE, SILENT@ and @LOG@." )
+
+#:def_opt( "KCL_FLAG", "kcl-flag|kclflag", "CP", \
+ "joblist", \
+ "Modify the KCL flag of KCL files. A comma separated job list in the" \
+ " format @'srclist=dest'@ is expected. @'srclist'@ is a plus sign" \
+ " separated list with single values like @<val>@, @T<type>@ and" \
+ " @<val>/<mask>@ or ranges like @<val>:<val>@, @T<type>:<type>@ and" \
+ " @<val>:<val>/<mask>@. @'<val>'@ is a complete KCL flag in the range" \
+ " of @0..0xffff@. @'<type>'@ are only the base types in the range of" \
+ " @0..0x1f@. If @<mask>@ is present, it marks the relevant bits. For" \
+ " the @T<type>@ variant, the mask is set to @0x1f@.\n" \
+ " All KCL flags of the source list are assigned to the new value" \
+ " @'dest'@, but only the set bits of @'<mask>'@ are modified. A later" \
+ " definition overrides the previous one." )
+
+#:def_opt( "KCL_SCRIPT", "kcl-script|kclscript", "CP", \
+ "script", \
+ "After reading a KCL source file and executing all transformations," \
+ " the text file @'script'@ is executed by the internal text parser." \
+ " The script should use the parser functions @tri$$*()@ to read and" \
+ " modify the triangle positions and flags, or to add or remove" \
+ " complete triangles.\n" \
+ " If this option is used multiple times, each script is executed in" \
+ " the entered order." )
+
+#:def_opt( "TRI_AREA", "tri-area|triarea", "GP", \
+ "EXPR", \
+ "Define the minimal area size of KCL triangles. The intention is to" \
+ " ignore triangles that are generally to small. @EXPR@ is a floating" \
+ " point number or expression. Triangles are invalidated if their area" \
+ " size is smaller than @EXPR@. The test is executed after reading" \
+ " files, after transformations, and after calculating normals and" \
+ " lengths. Values between 0.01 and 4.0 are recommended. The careful" \
+ " value 1.0 is used as default. Value 0 disables this filter" \
+ " functionality." )
+
+#:def_opt( "TRI_HEIGHT", "tri-height|triheight|tri-ht|triht|kcl-min|kclmin", "GP", \
+ "EXPR", \
+ "Define the minimal height of KCL triangles. The intention is to" \
+ " ignore deformed triangles (very slim, but long). @EXPR@ is a" \
+ " floating point number or expression. Triangles are invalidated if at" \
+ " least 1 of the 3 heights is smaller than @EXPR@. The test is" \
+ " executed after reading files, after transformations, and after" \
+ " calculating normals and lengths. Values between 0.01 and 2.0 are" \
+ " recommended. The careful value 1.0 is used as default. Value 0" \
+ " disables this filter functionality.\n" \
+ " --tri-ht is an alternative name for the option." )
+
+#:def_opt( "FLAG_FILE", "flag-file|flagfile", "CP", \
+ "filename", \
+ "Define a flag file if scanning an OBJ file (KCL processing). The file" \
+ " name may contain %-escapes. Set it to an empty string to disable" \
+ " flag files at all.\n" \
+ " The tool search the flag file in the following order until found:" \
+ " File defined by --flag-file; OBJ file name with replaced extension" \
+ " ('a.obj' becomes 'a.flag'); OBJ file name with appended extension" \
+ " ('a.obj' becomes 'a.obj.flag')." )
+
+#:def_opt( "SLOT", "slot", "CP", \
+ "keyword", \
+ "Patch a track file to run at the specified slot. KMP and KCL may be" \
+ " modified. BRRES files may be added to or removed from SZS. The main" \
+ " keywords are @DAISY, DESERT, SHERBET, SHYGUY, STANDARD@ and @MOST@." \
+ " Slot numbers (except '42' and '4.2') and different other track names" \
+ " are also accepted. For some conversions, the auto-add library is" \
+ " needed." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Create smaller output." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "NO_CHECK", "N|no-check|nocheck", "C", \
+ "", \
+ "Do not make plausibility checks for KCL files." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "TINY", "tiny", "GP", \
+ "mode", \
+ "Set tiny mode to a level between 0 and 7." )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEST", "VERBOSE", \
+ "", \
+ "Print the matrices of transformations." )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "BRIEF", \
+ "", \
+ "If set once, suppress vector dumps for transformation steps and" \
+ " ignore option --long. If set twice, suppress vector dump for final" \
+ " transformation too." )
+
+#:def_cmd_opt( "MATRIX", "LONG", \
+ "", \
+ "If set once, print inverse matrix for the final transformation. If" \
+ " set twice, print inverse matrix for all transformations." )
+
+#:def_cmd_opt( "MATRIX", "QUIET", \
+ "", \
+ "Option --quiet is dedicated to automatic tests comparing the old and" \
+ " new transformation algorithms. If set once, the tables are only" \
+ " printed, if the results differ. If set twice, nothing is printed at" \
+ " all and only the exit status will inform about the results." )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COPY", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "LONG", \
+ "", \
+ "Force usage of @'f(typ,variant)'@. If set twice, force usage of" \
+ " @'a(typ,w,x,y,z)'@." )
+
+#:def_cmd_opt( "CFF", "BRIEF", \
+ "", \
+ "Suppress the comments with the alternative expression formats." )
+
+#:def_cmd_opt( "CFF", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CFF", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "BRIEF", \
+ "", \
+ "Suppress the output of detailed flag list and print only the type" \
+ " summary." )
+
+#:def_cmd_opt( "FLAGS", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLAGS", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "BRIEF", \
+ "", \
+ "Suppress the output of the triangle list and print only the header" \
+ " data and statistics." )
+
+#:def_cmd_opt( "DUMP", "LONG", \
+ "", \
+ "If set, append an octree dump to the output. If set twice, add a" \
+ " triangle usage list behind the octree dump." )
+
+#:def_cmd_opt( "DUMP", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "BRIEF", \
+ "", \
+ "Suppress the output of the triangle list and print only the header" \
+ " data and statistics." )
+
+#:def_cmd_opt( "DBRIEF", "LONG", \
+ "", \
+ "If set, append an octree dump to the output. If set twice, add a" \
+ " triangle usage list behind the octree dump." )
+
+#:def_cmd_opt( "DBRIEF", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DBRIEF", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LIST", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "BRIEF", \
+ "", \
+ "Suppress the output of the 'normals' data." )
+
+#:def_cmd_opt( "TRIANGLES", "LONG", \
+ "", \
+ "For each occurrence of option --long increase the precision of the" \
+ " floating points numbers by adding 1 fractional digit, but only up to" \
+ " additionally 5 digits." )
+
+#:def_cmd_opt( "TRIANGLES", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRIANGLES", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "BRIEF", \
+ "", \
+ "Print the 0-based triangle index instead of the triangle coordinates." )
+
+#:def_cmd_opt( "TRAVERSE", "LONG", \
+ "", \
+ "If set, print a calculation log. If set twice, print a calculation" \
+ " log for each octree traversing step." )
+
+#:def_cmd_opt( "TRAVERSE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRAVERSE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "BRIEF", \
+ "", \
+ "Print only the height (y coordinate) of the result." )
+
+#:def_cmd_opt( "FALL", "LONG", \
+ "", \
+ "If set, print a calculation log. If set twice, be more verbose." )
+
+#:def_cmd_opt( "FALL", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FALL", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BRIEF", \
+ "", \
+ "Print only warnings and suppress hints." )
+
+#:def_cmd_opt( "CHECK", "LONG", \
+ "", \
+ "Be verbose and print more statistics." )
+
+#:def_cmd_opt( "CHECK", "QUIET", \
+ "", \
+ "Be quiet until the first warning or hint is found." )
+
+#:def_cmd_opt( "CHECK", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "KCL_FLAG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "TRI_AREA", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "TRI_HEIGHT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "FLAG_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "BLOW", "IGNORE", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wkmpt' ###############
+###############################################################################
+
+#:def_tool( "wkmpt", \
+ "wkmpt [option]... command [option|parameter|@file]...", \
+ "Wiimms KMP Tool : Analyze, modify, export and create (compile) KMP" \
+ " files." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wkmpt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wkmpt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wkmpt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wkmpt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wkmpt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wkmpt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wkmpt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wkmpt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wkmpt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wkmpt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wkmpt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wkmpt SYMBOLS", \
+ "Print predefined symbols of text parser to standard output. The KMP" \
+ " specific symbols are included." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wkmpt FUNCTIONS [key]...", \
+ "Print a list with all parser functions including the KMP specific" \
+ " functions. If one key ore more key entered, then only functions that" \
+ " match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wkmpt CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "MATRIX", "MATRIX", \
+ "wkmpt MATRIX [patch-option]... [vector]...", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results.", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results. The transformations are done with 4" \
+ " different methods to confirm the algorithms. Only the main results" \
+ " and results, which differ, are printed.\n" \
+ " Normally, the exit status is @OK@ (null). If at least one old" \
+ " transformation returns different results for the different" \
+ " algorithms, then status @DIFFER@ (not null) is returned." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wkmpt FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "STARTPOS", "STARTPOS|SP", \
+ "wkmpt STARTPOS [patch-option]... key_or_file...", \
+ "Print an ASCII image or a table of the start positions. The parameter" \
+ " list is a wild mix of filenames, keywords and numbers.\n" \
+ " If a parameter contains a slash ('/' or '\\'), it is a filename of" \
+ " a KMP or SZS file and a KMP is loaded. The KMP is used to print" \
+ " absolute positions and to find the settings for @LEFT/RIGHT@ and" \
+ " @WIDE/NARROW@ automatically.\n" \
+ " A parameter may also be one of the following keywords to define a" \
+ " setting: @RESET, IMAGE, TABLE, RELATIVE, ABSOLUTE, LEFT, RIGHT," \
+ " WIDE, NARROW, AUTO, NO-AUTO, DECIMAL, HEXADECIMAL, Z0, Z1, Z2, Z3@." \
+ " A table or image is only printed on numbers 1 to 12." )
+
+#:def_cmd( "OBJECTS", "OBJECTS|OBJ", \
+ "wkmpt OBJECTS key...", \
+ "Infos about all objects, that match any of the entered keys, are" \
+ " printed. A key match, if the text is part of the object name, file" \
+ " list or info (ignoring case). If a key is a number (decimal or hex)," \
+ " the object with that id matches too. This command uses an internal" \
+ " object and file database." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wkmpt CAT [source]...", \
+ "Read the entered KMP files (text, binary or szs) and print them as" \
+ " decoded text files to standard output. The output of all source" \
+ " files is concatenated." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wkmpt DECODE [source]...", \
+ "Read the entered KMP files (text or binary) and decode them to text" \
+ " files. The default destination is @'%P/%N.txt'@." )
+
+#:def_cmd( "ENCODE", "ENCODE|ENC", \
+ "wkmpt ENCODE source...", \
+ "Read the entered KMP files (text or binary) and encode (compile) them" \
+ " to binary files. The default destination is @'%P/%N.kmp'@." )
+
+#:def_cmd( "DIFF", "DIFF|CMP", \
+ "wkmpt DIFF source1 source2\n" \
+ "wkmpt DIFF source... --dest dest", \
+ "Compare the KMP of two or more sources (KMP, KMP-text or SZS). Each" \
+ " KMP will be converted into the internal format, and then fixed and" \
+ " patched controlled by options. Only the known sections are compared." \
+ " If option SORT (see {--diff}) is set, elements of section GOBJ are" \
+ " sorted by object-id.\n" \
+ " This command is in development. So for the section @POTI@ only a" \
+ " simple notice about the different data record is printed.\n" \
+ " If option {--dest} is set, then each source file is compared with a" \
+ " file in the destination." )
+
+#:def_cmd( "DRAW", "DRAW|D|COBJECT|COB", \
+ "wkmpt DRAW source...", \
+ "Read the entered KMP files (text or binary), of needed load the" \
+ " related KCL file, draw KMP objects and create an OBJ file. The" \
+ " default destination is @'%P/%N.kmp.obj'@.\n" \
+ " Automated dropping of bad KCL triangles is enabled if no drop" \
+ " option is specified by option {--kcl}." )
+
+#:def_cmd( "CHECK", "CHECK|CHK", \
+ "wkmpt CHECK source...", \
+ "Read the entered KMP files (text or binary) and and make a" \
+ " plausibility check. Hints and warnings are written to standard" \
+ " output. The exit status is @'DIFFER'@ if at least one KMP warning" \
+ " found." )
+
+#:def_cmd( "STGI", "STGI", \
+ "wkmpt STGI file...", \
+ "Find the first KMP:STGI of each file and print an analysis of it as" \
+ " single line statistic. Additional the number of lap counter check" \
+ " points ('LC') is printed. Track and KMP (binary and text) files are" \
+ " accepted as input." )
+
+#:def_cmd( "KTPT", "KTPT", \
+ "wkmpt KTPT [source]...", \
+ "Analyse the start positions (KMP:KTPT) and lap counters (KMP:CKPT" \
+ " with mode 0) and print a simple information list. Use enemy points" \
+ " (KMP:ENPT) to find recommendations.\n" \
+ " This command is dedicated to LE-CODE, which supports an alternative" \
+ " position for the finish line at the minimap." )
+
+#:def_cmd( "ROUTES", "ROUTES", \
+ "wkmpt ROUTES file...", \
+ "Print the internal cross references for routes of KMP sections CKPH," \
+ " CKPT, ENPH, ENPT, ITPH and ITPT." )
+
+#:def_cmd( "GAMEMODES", "GAMEMODES|GMODES", \
+ "wkmpt GAMEMODES [source]...", \
+ "Analyze the presence flags combinations with and without extension" \
+ " support and print a list. The lists consists of index, scenario" \
+ " version and scenario name. Scenario versions are only equal, if the" \
+ " scenarios are duplicates. Duplicates happens only, if {--gamemodes}" \
+ " option TT or FULL is set." )
+
+#:def_cmd( "WIM0", "WIM0|W0", \
+ "wkmpt WIM0 [source]...", \
+ "Analyze the WIM0 section of each KMP file (text, binary or szs) and" \
+ " print an info about it." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "Enable LE-CODE and CT-CODE support. The optional parameter is" \
+ " deprecated and ignored." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "SCALE", "scale", "CP", \
+ "vector[@origin]", \
+ "Transform the data: Scale all coordinates and size values by 'vector'" \
+ " relative to the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Negative values mirror the coordinates. Each parameter is either a" \
+ " vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "SHIFT", "shift", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--translate}, but the addition is done before rotation. The" \
+ " parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XSS", "xss", "CP", \
+ "x1old,x1new,x2old,x2new", \
+ "--xss (x-scale-shift) calculates the X values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "YSS", "yss", "CP", \
+ "y1old,y1new,y2old,y2new", \
+ "--yss (y-scale-shift) calculates the Y values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ZSS", "zss", "CP", \
+ "z1old,z1new,z2old,z2new", \
+ "--zss (z-scale-shift) calculates the Z values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ROT", "rot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes" \
+ " through the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y,z').\n" \
+ " Option --rot is an alternative for {--xrot}, {--yrot} and {--zrot}" \
+ " to define all 3 rotations in one step. Transformations are" \
+ " calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XROT", "xrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('y,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "YROT", "yrot|hrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead. This is" \
+ " a horizontal counterclockwise rotation and the old option name" \
+ " --hrot can also used.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "ZROT", "zrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the z-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "YPOS", "ypos", "CP", \
+ "pos", \
+ "This option defines an Y position for KMP:CKPT transformations. It" \
+ " has only impact to X and Z rotations (Options {--xrot} and" \
+ " {--zrot}). If not set, the mean y of the active rotation origins are" \
+ " used." )
+
+#:def_opt( "TRANSLATE", "translate", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--shift}, but the addition is done after rotation. The parameter is" \
+ " either a vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z'). @--trans@ is a short cut.\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "NULL", "null", "C", \
+ "", \
+ "Create a neutral transformation without affecting the coordinates." \
+ " The only influence is, that the dependent values (like maximum) are" \
+ " re-calculated as if a transformation has taken place." )
+
+#:def_opt( "NEXT", "next", "C", \
+ "", \
+ "Close the current transformation step with all scaling, shifting," \
+ " rotation and translation options and open a new step with cleared" \
+ " options. On transformation each step is logical done one by one. In" \
+ " real, one total transformation matrix is calculated and used for" \
+ " fast transformations.\n" \
+ " If option --next is used, the ability for modifying the scale and" \
+ " rotation vectors (not the positions) of different KMP sections is" \
+ " nearly always lost. A warning is printed if this occurs." )
+
+#:def_opt( "ASCALE", "ascale", "CP", \
+ "factor@dir", \
+ "Transform the data and do an axis scale: Close the current" \
+ " transformation step like {--next} and scale the data by @'factor'@" \
+ " into the direction given by the vector @'dir'@. Store the resulting" \
+ " matrix as single transformation step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "AROT", "arot", "CP", \
+ "degree[@pos1]@pos2", \
+ "Transform the data and do an axis rotation: Close the current" \
+ " transformation step like {--next} and rotate the data by @'degree'@" \
+ " around the axis defined by the 2 points. If @'pos1'@ is not set, use" \
+ " @0,0,0@ instead. Store the resulting matrix as single transformation" \
+ " step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "TFORM_SCRIPT", "tform-script|tformscript", "CP", \
+ "script", \
+ "Load the script and execute it by the text parser.\n" \
+ " Then for each coordinate (2D and 3D), call the macro @TRANSFORM@" \
+ " after all other transformations. Call it without parameters and set" \
+ " variable @$$I@ with a zero based index of all vertices, variable" \
+ " @$$D@ to the dimension (2 or 3) and the variable @$$P@ to the vector" \
+ " of the current vertex. If the macro returns a vector, it is the new" \
+ " position.\n" \
+ " For each file, macro @BEGIN@ is called at the beginning and @END@" \
+ " after processing all points, but only, if the macros are defined." \
+ " For @END@, variable @$$I@ is set to the number of processed vertices" \
+ " in the current file.\n" \
+ " Before each macro call, the private and local variables are cleared" \
+ " and only global parameters are permanent. The zero based index is" \
+ " cleared for each new source. The parameters of the macro calls are" \
+ " defined in the local name space." )
+
+#:def_opt( "RM_GOBJ", "rm-gobj|rmgobj", "CP", \
+ "objlist", \
+ "Remove objects from the KMP section @GOBJ@. Therefor a comma" \
+ " separated object list with single values like @'a'@ or ranges like" \
+ " @'a:b'@ is expected. @'a'@ and @'b'@ are numbers, object names" \
+ " (prefixed by 'o$$') or any other parser expressions." )
+
+#:def_opt( "BATTLE", "battle", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used.\n" \
+ " If mode is @ON@, assume a battle arena and enable a spüecial" \
+ " battle support. If mode is @OFF@, disable special battle arena" \
+ " support. If mode is @AUTO@, analyse the KMP and estimate, if it is a" \
+ " battle areana. Modes @ON@ and @OFF@ override KMP parameter" \
+ " @BATTLE-MODE@." )
+
+#:def_opt( "EXPORT_FLAGS", "export-flags|exportflags|exflags", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used. --exflags is an alternative name for the option.\n" \
+ " If mode is @ON@, this feature is forced: On creating a KMP text" \
+ " file, the option @EXPORT-FLAGS@ is always set to 1. On creating a" \
+ " binary KMP file, the flags are always exported as lowest byte of the" \
+ " scale factors or x-rotation.\n" \
+ " If mode is @OFF@, this feature is totally disabled. If mode is not" \
+ " @AUTO@, KMP parameter @EXPORT-FLAGS@ is overridden." )
+
+#:def_opt( "ROUTE_OPTIONS", "route-options|routeoptions|ropt", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used.\n" \
+ " On mode @ON@, the new commands @$$PREV@ and @$$NEXT@ are printed" \
+ " for each group of KMP sections ENPT and ITPT. On mode @AUTO@, the" \
+ " command is only printed, if any option is set or if parameter" \
+ " @SHOW-OPTIONS@ is >0. On mode @OFF@, this feature is totally" \
+ " disabled to create KMP text files that are compatible with versions" \
+ " <1.60a.\n" \
+ " This option exists only for a transition period. Its behaviour will" \
+ " be changed in the future. @--ropt@ is a short cut." )
+
+#:def_opt( "WIM0", "wim0", "GO", \
+ "[=mode]", \
+ "@MODE@ is either @OFF@, @AUTO@ (default) or @ON@. Without value, @ON@" \
+ " is used.\n" \
+ " If mode is @ON@, a KMP section called WIM0 is added on binary KMP" \
+ " creation. The sections contains information for Wiimms tools.\n" \
+ " If mode is @OFF@, this feature is totally disabled. If mode is not" \
+ " @AUTO@, KMP parameter @KMP-WIM0@ is overridden." )
+
+#:def_opt( "SLOT", "slot", "CP", \
+ "keyword", \
+ "Patch a track file to run at the specified slot. KMP and KCL may be" \
+ " modified. BRRES files may be added to or removed from SZS. The main" \
+ " keywords are @DAISY, DESERT, SHERBET, SHYGUY, STANDARD@ and @MOST@." \
+ " Slot numbers (except '42' and '4.2') and different other track names" \
+ " are also accepted. For some conversions, the auto-add library is" \
+ " needed." )
+
+#:def_opt( "DRAW", "w|draw", "CP", \
+ "list", \
+ "The parameter is a comma separated list of keywords to select the" \
+ " elements to draw. Allowed keywords are: @CKPT, CJGPT, JGPT, KTPT," \
+ " ENPT, ITPT, POTI, CNPT, ITEMBOXES, COINS, ROADOBJECTS, SOLIDOBJECTS," \
+ " DECORATION, BLACK, WHITE, KCL, NONE@ and @ALL@ (default); the" \
+ " classes @POINTS, OBJECTS@ and @RESPAWN@; the presence-flag selectors" \
+ " @[1-3]OFFLINE@ and @[1-3]ONLINE@; the special options @DETAILED," \
+ " DISPATCH@ and @WARNINGS@. If a keyword is prefixed by a minus sign," \
+ " the option is disabled. Option @KCL@ decides, if the reference KCL" \
+ " is included in the output. If @DETAILED@ is disabled, an output with" \
+ " less faces is created. If @DISPATCH@ is enabled, the settings of" \
+ " dispatch points are visualized. If @WARNINGS@ is enabled, some" \
+ " objects are drawn in red." )
+
+#:def_opt( "POS_MODE", "pos-mode|posmode", "CP", \
+ "list", \
+ "Define a comma separated list of modes for the next {--pos-file}" \
+ " options. Each element of the list begins with a keyword followed by" \
+ " a column index and/or a parameter list: @X<col>, Y<col>, Z<col>," \
+ " D<col>, C<num>, T<num>, FA<col>=<str>, FB<col>=<str>, FC<col>=<str>," \
+ " <COLOR>@" )
+
+#:def_opt( "POS_FILE", "pos-file|posfile", "CP", \
+ "file", \
+ "Load a position file created by mkw-ana and print the positions into" \
+ " the map. Define the modes first, because the last defined modes set" \
+ " by {--pos-mode} are used!" )
+
+#:def_opt( "PNG", "png", "CP", \
+ "pix_size ['a' align] ['x' x1[:x2]] ['y' y1[:y2]] ['t' types]", \
+ "Draw a PNG with a top view of the track instead of an OBJ file." \
+ " Transformations are done after the KMP 3D drawing, but before PNG" \
+ " creation.\n" \
+ " @'pix_size'@ is the number of world units (sqare) used for 1 PNG" \
+ " pixel. @'align'@ is a factor as anti-aliasing pixel multiplicator" \
+ " (>1 is on). @'x'@ and @'y'@ defines the part of the world that is" \
+ " displayed. If not set, the check points (KMP/CKPT) are used to find" \
+ " a good area. @'t'@ is a bit field with 32 bits to enable the the KCL" \
+ " types. Each bit corresponds to one of the KCL types and only . The" \
+ " default is to display all but not walls and solid fall (0x7fef0bff).\n" \
+ " All numeric values can be any expression allowed by the parser." )
+
+#:def_opt( "LOAD_KCL", "load-kcl|loadkcl", "GP", \
+ "file", \
+ "Load a KCL or OBJ file for reference issues." )
+
+#:def_opt( "KCL", "kcl", "GP", \
+ "list", \
+ "Set global options for KCL processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. Keywords @SMALL, MEDIUM@ and @CHARY@ select the default" \
+ " parameters for the octree creation. The other allowed keywords are:" \
+ " @FAST, NEW, CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP," \
+ " G, USEMTL, CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED," \
+ " DROP-FIXED, DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL," \
+ " CONV-FACEUP, WEAK-WALLS, SORT, INPLACE, SILENT@ and @LOG@." )
+
+#:def_opt( "KCL_FLAG", "kcl-flag|kclflag", "CP", \
+ "joblist", \
+ "Modify the KCL flag of KCL files. A comma separated job list in the" \
+ " format @'srclist=dest'@ is expected. @'srclist'@ is a plus sign" \
+ " separated list with single values like @<val>@, @T<type>@ and" \
+ " @<val>/<mask>@ or ranges like @<val>:<val>@, @T<type>:<type>@ and" \
+ " @<val>:<val>/<mask>@. @'<val>'@ is a complete KCL flag in the range" \
+ " of @0..0xffff@. @'<type>'@ are only the base types in the range of" \
+ " @0..0x1f@. If @<mask>@ is present, it marks the relevant bits. For" \
+ " the @T<type>@ variant, the mask is set to @0x1f@.\n" \
+ " All KCL flags of the source list are assigned to the new value" \
+ " @'dest'@, but only the set bits of @'<mask>'@ are modified. A later" \
+ " definition overrides the previous one." )
+
+#:def_opt( "KCL_SCRIPT", "kcl-script|kclscript", "CP", \
+ "script", \
+ "After reading a KCL source file and executing all transformations," \
+ " the text file @'script'@ is executed by the internal text parser." \
+ " The script should use the parser functions @tri$$*()@ to read and" \
+ " modify the triangle positions and flags, or to add or remove" \
+ " complete triangles.\n" \
+ " If this option is used multiple times, each script is executed in" \
+ " the entered order." )
+
+#:def_opt( "TRI_AREA", "tri-area|triarea", "GP", \
+ "EXPR", \
+ "Define the minimal area size of KCL triangles. The intention is to" \
+ " ignore triangles that are generally to small. @EXPR@ is a floating" \
+ " point number or expression. Triangles are invalidated if their area" \
+ " size is smaller than @EXPR@. The test is executed after reading" \
+ " files, after transformations, and after calculating normals and" \
+ " lengths. Values between 0.01 and 4.0 are recommended. The careful" \
+ " value 1.0 is used as default. Value 0 disables this filter" \
+ " functionality." )
+
+#:def_opt( "TRI_HEIGHT", "tri-height|triheight|tri-ht|triht|kcl-min|kclmin", "GP", \
+ "EXPR", \
+ "Define the minimal height of KCL triangles. The intention is to" \
+ " ignore deformed triangles (very slim, but long). @EXPR@ is a" \
+ " floating point number or expression. Triangles are invalidated if at" \
+ " least 1 of the 3 heights is smaller than @EXPR@. The test is" \
+ " executed after reading files, after transformations, and after" \
+ " calculating normals and lengths. Values between 0.01 and 2.0 are" \
+ " recommended. The careful value 1.0 is used as default. Value 0" \
+ " disables this filter functionality.\n" \
+ " --tri-ht is an alternative name for the option." )
+
+#:def_opt( "FLAG_FILE", "flag-file|flagfile", "CP", \
+ "filename", \
+ "Define a flag file if scanning an OBJ file (KCL processing). The file" \
+ " name may contain %-escapes. Set it to an empty string to disable" \
+ " flag files at all.\n" \
+ " The tool search the flag file in the following order until found:" \
+ " File defined by --flag-file; OBJ file name with replaced extension" \
+ " ('a.obj' becomes 'a.flag'); OBJ file name with appended extension" \
+ " ('a.obj' becomes 'a.obj.flag')." )
+
+#:def_opt( "KMP", "kmp", "GP", \
+ "list", \
+ "Set global options for KMP processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. The other allowed keywords are: @FORCE, NEW, RM-SPCITEM, LEFT," \
+ " RIGHT, WIDE, NARROW, FIX-CKPH, FIX-ENPH, FIX-ITPH, FIX-PH," \
+ " FIX-CKNEXT, FIX-CKJGPT, FIX-CK, FIX-ALL, MASK-PFLAGS, RM-LECODE," \
+ " PURGE-GOBJ, FULL-DEFOBJ, DUMP-CLASS, DUMP-ONEWAY, DUMP-ALL, 1LAP ..." \
+ " 9LAPS, MAX-LAPS, RM-EMPTY, INPLACE, SILENT@ and @LOG@." )
+
+#:def_opt( "SPEED_MOD", "speed-mod|speedmod", "GP", \
+ "factor", \
+ "The speed modifier is a user extensions to change the basic speed of" \
+ " all vehicles. The speed factor itself is stored into KMP:STGI" \
+ " section of a track.\n" \
+ " If --speed-mod is set to a value >0.0, then the last 2 bytes of" \
+ " the STGI section are patched. The value 0.0 reset these 2 bytes and" \
+ " deactivates the speed modifier." )
+
+#:def_opt( "KTPT2", "ktpt2", "GP", \
+ "vector", \
+ "Insert or replace a second KTPT. Use VECTOR as new position. VECTOR" \
+ " is either @X,Z@ or @X,Y,Z@ or an expression. Set Y to 0 for an" \
+ " automatic defined height.\n" \
+ " If the first 4 characters of VECTOR are 'AUTO' (ignoring case)," \
+ " then the position is calculated automatically and set to the" \
+ " recommendation of command @wkmpt KTPT@.\n" \
+ " The tool looks for the nearest lap counter (CKPT with mode 0) and" \
+ " adjust the KTPT: The direction of the lap counter is copied and the" \
+ " KTPT is moved to the lap counter line using the new direction.\n" \
+ " LE-CODE uses the second KTPT to draw the finish line at another" \
+ " place away from the start position." )
+
+#:def_opt( "TFORM_KMP", "tform-kmp|tformkmp|tkmp", "GP", \
+ "list", \
+ "Select KMP sections and objects for a transformation. @--tkmp@ is a" \
+ " short cut. The option expects a comma separated list of keywords." \
+ " Non ambiguous of keywords are allowed and minus signs within" \
+ " keywords are optional (e.g. @GOBJS@). A minus sign before a keyword" \
+ " disables transformation of the related section or object.\n" \
+ " Sections are selected by the KMP section names @AREA, CAME, CKPT," \
+ " CNPT, ENPT, GOBJ, ITPT, JGPT, KTPT, MSPT@ and @POTI@.\n" \
+ " Objects are selected by the keywords @AREA-POSITION, AREA-ROTATE," \
+ " AREA-SCALE, CAME-POSITION, CKPT-POSITION, CNPT-POSITION," \
+ " CNPT-ROTATE, ENPT-POSITION, ENPT-SCALE, GOBJ-POSITION, GOBJ-ROTATE," \
+ " GOBJ-SCALE, ITPT-POSITION, ITPT-SCALE, JGPT-POSITION, JGPT-ROTATE," \
+ " KTPT-POSITION, KTPT-ROTATE, MSPT-POSITION, MSPT-ROTATE@ and" \
+ " @POTI-POSITION@.\n" \
+ " The keywords @NONE@ and @ALL@ (default) complete the field." )
+
+#:def_opt( "REPAIR_XPF", "repair-xpflags|repairxpflags|repxpf", "CP", \
+ "file", \
+ "Load a KMP file and use it to repair the settings of the extended" \
+ " presence flags, if they are destroyed by another KMP tool." \
+ " @--repxpf@ is a short cut for this option." )
+
+#:def_opt( "GAMEMODES", "gamemodes|gmodes", "CP", \
+ "list", \
+ "Filter the list of combinations. The parameter is a comma separated" \
+ " list of keywords: @AUTO@: Add a automatic mode without conditions" \
+ " first. @STANDARD@ (or @STD@): Add standard modes. @1STANDARD@ (or" \
+ " @1STD@): Add standard modes first. @BALLOON@: Add balloon battle" \
+ " modes. @COIN@: Add coin runners modes. @BATTLE@: Short cut for" \
+ " 'BALLOON,COIN'. @VERSUS@ (or @VS@): Add versus modes. @ITEMRAIN@:" \
+ " Add itemrain modes. @RACE@: Short cut for 'VERSUS,ITEMRAIN'. @ALL@" \
+ " (default): Short cut for 'STANDARD,BATTLE,RACE'. @NO-MODES@: Exclude" \
+ " 'ALL' and create auto modes only. @ENGINE@: Include engine classes" \
+ " (default). @NO-ENGINE@: Exclude engine classes. @RANDOM@: Include" \
+ " random modes (default). @NO-RANDOM@: Exclude random modes." \
+ " @OFFLINE@: Filter offline modes. @ONLINE@: Filter online modes." \
+ " @NO-TT@: Exclude time trial. @TT@: Force a time trial scenario, even" \
+ " if it is a duplicate. @FULL@: Don't eliminate duplicates from list" \
+ " (up to 1573 modes). @NSORT@: Sort the list by name. @ISORT@: Sort" \
+ " the list by index. @DEBUG@: Print a debug info about this option." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Suppress information lines in decoded KMP text files. This includes" \
+ " syntax information ({--no-header}). If set twice, the output of" \
+ " unneeded sections is also suppressed." )
+
+#:def_opt( "EXPORT", "X|export", "C", \
+ "", \
+ "Enable the export mode and create small and machine readable text" \
+ " files for easy post processing. The option works similar like @-HBB@" \
+ " for KMP text files." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "EPSILON", "epsilon", "CP", \
+ "float", \
+ "When comparing floating point numbers, 2 numbers are considered" \
+ " identical if their difference is less than or equal to epsilon. The" \
+ " default value is @0.01@." )
+
+#:def_opt( "DIFF", "diff", "CP", \
+ "list", \
+ "List of KMP sections names that should be compared. To select a" \
+ " section, use a combiantion of the following keywords: @AREA, CAME," \
+ " CNPT, CKPH, CKPT, ENPH, ENPT, GOBJ, ITPH, ITPT, JGPT, KTPT, MSPT," \
+ " POTI, STGI, NONE, GOOD, DEFAULT@ of @ALL@ (default). Additional" \
+ " keywords are @SORT@ (default) and @NOSORT@" )
+
+#:def_opt( "GENERIC", "G|generic", "C", \
+ "", \
+ "Forget scanned entry names and use generic names for output." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "NO_CHECK", "N|no-check|nocheck", "C", \
+ "", \
+ "Do not make plausibility checks for KMP files." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "TINY", "tiny", "GP", \
+ "mode", \
+ "Set tiny mode to a level between 0 and 7." )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEST", "VERBOSE", \
+ "", \
+ "Print the matrices of transformations." )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "BATTLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "EXPORT_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ROUTE_OPTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "WIM0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "BRIEF", \
+ "", \
+ "If set once, suppress vector dumps for transformation steps and" \
+ " ignore option --long. If set twice, suppress vector dump for final" \
+ " transformation too." )
+
+#:def_cmd_opt( "MATRIX", "LONG", \
+ "", \
+ "If set once, print inverse matrix for the final transformation. If" \
+ " set twice, print inverse matrix for all transformations." )
+
+#:def_cmd_opt( "MATRIX", "QUIET", \
+ "", \
+ "Option --quiet is dedicated to automatic tests comparing the old and" \
+ " new transformation algorithms. If set once, the tables are only" \
+ " printed, if the results differ. If set twice, nothing is printed at" \
+ " all and only the exit status will inform about the results." )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "BATTLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "EXPORT_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "ROUTE_OPTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "WIM0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STARTPOS", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "OBJECTS", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "OBJECTS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "OBJECTS", "BRIEF", \
+ "", \
+ "Don't print the file list and the info line(s). If set twice, only ID" \
+ " and object name is printed and option {--long} is ignored." )
+
+#:def_cmd_opt( "OBJECTS", "LONG", \
+ "", \
+ "Print each setting starting on a new line. --long and {--brief} can" \
+ " be used together." )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in KMP text files." )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "GENERIC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "BATTLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "EXPORT_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ROUTE_OPTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "WIM0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in KMP text files." )
+
+#:def_cmd_opt( "DECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "GENERIC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "BATTLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "EXPORT_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ROUTE_OPTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "WIM0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "BATTLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "EXPORT_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ROUTE_OPTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "WIM0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "QUIET", \
+ "", \
+ "If set once, only a summary status is printed. If set twice, the" \
+ " status is only reported as exit status." )
+
+#:def_cmd_opt( "DIFF", "EPSILON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "DIFF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DIFF", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "DRAW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "POS_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "POS_FILE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "PNG", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in KMP text files." )
+
+#:def_cmd_opt( "DRAW", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NO_PARAM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "GENERIC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "BATTLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "EXPORT_FLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "ROUTE_OPTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "WIM0", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "YPOS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "SPEED_MOD", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "TFORM_KMP", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "REPAIR_XPF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "RM_GOBJ", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "SLOT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "LOAD_KCL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DRAW", "KCL_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "BRIEF", \
+ "", \
+ "Print only warnings and suppress hints." )
+
+#:def_cmd_opt( "CHECK", "LONG", \
+ "", \
+ "Be verbose and print more statistics." )
+
+#:def_cmd_opt( "CHECK", "QUIET", \
+ "", \
+ "Be quiet until the first warning or hint is found." )
+
+#:def_cmd_opt( "CHECK", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "GENERIC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CHECK", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STGI", "IGNORE", \
+ "", \
+ "If set, ignore non existing source files and files without KMP" \
+ " without warning. If set twice, ignore files with standard settings" \
+ " too." )
+
+#:def_cmd_opt( "KTPT", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KTPT", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KTPT", "KTPT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "KTPT", "IGNORE", \
+ "", \
+ "If set, ignore non existing source files and files without KMP" \
+ " without warning." )
+
+#:def_cmd_opt( "KTPT", "LONG", \
+ "", \
+ "If set, compare each KTPT with each lap counter (some CKPT) and print" \
+ " positions, directions, distances and recommendations as wide table." )
+
+#:def_cmd_opt( "ROUTES", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ROUTES", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ROUTES", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ROUTES", "IGNORE", \
+ "", \
+ "If set, ignore non existing source files and files without KMP" \
+ " without warning." )
+
+#:def_cmd_opt( "GOBJ", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GOBJ", "NO_HEADER", \
+ "", \
+ "Suppress head and foot lines." )
+
+#:def_cmd_opt( "GOBJ", "BRIEF", \
+ "", \
+ "Print only summary for each object category. If set twice, print a" \
+ " status vector only." )
+
+#:def_cmd_opt( "GOBJ", "LONG", \
+ "", \
+ "?" )
+
+#:def_cmd_opt( "GAMEMODES", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GAMEMODES", "GAMEMODES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GAMEMODES", "NO_HEADER", \
+ "", \
+ "Suppress head and foot lines." )
+
+#:def_cmd_opt( "GAMEMODES", "BRIEF", \
+ "", \
+ "Print only the scenario version and configuration name. If set twice," \
+ " suppress ead and foot lines too." )
+
+#:def_cmd_opt( "GAMEMODES", "LONG", \
+ "", \
+ "If set, print a status vector for each GOBJ element too: '-': Object" \
+ " diabled; '=': Object diabled by presence flags, but visible before" \
+ " race; '+': Object enabled; 'e': Depends on engine; 'r': Depends on" \
+ " random scenario; 'b': Defintion object of type BITS; 'o': Defintion" \
+ " object of type OR; 'a': Defintion object of type AND." )
+
+#:def_cmd_opt( "WIM0", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "WIM0", "LONG", \
+ "", \
+ "If set, disable table format and append a full hexdump for each WIM0" \
+ " section." )
+
+
+##
+###############################################################################
+############### Tool 'wlect' ###############
+###############################################################################
+
+#:def_tool( "wlect", \
+ "wlect [option]... command [option|parameter|@file]...", \
+ "Wiimms LE-CODE Tool : Manage the $LE-CODE$ and LEX extensions." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wlect VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wlect HELP [--width=wd] OPT|OPTION ...\n" \
+ "wlect HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wlect HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wlect HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wlect ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wlect TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wlect COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wlect ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wlect FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wlect FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wlect SYMBOLS", \
+ "Print predefined symbols of text parser to standard output. The" \
+ " LE-CODE specific symbols are included." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wlect FUNCTIONS [key]...", \
+ "Print a list with all parser functions including the LE-CODE specific" \
+ " functions. If one key ore more key entered, then only functions that" \
+ " match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wlect CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wlect FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "DUMP", "DUMP|D", \
+ "wlect DUMP [source]...", \
+ "Print an information dump for each source file. LE-CODE binaries and" \
+ " LEX binaries are accepted as input." )
+
+#:def_cmd( "DL", "DL", \
+ "wlect DL [source]...", \
+ "Short cut for {DUMP --long}." )
+
+#:def_cmd( "DLL", "DLL", \
+ "wlect DLL [source]...", \
+ "Short cut for {DUMP --long --long}." )
+
+#:def_cmd( "BIN_DIFF", "BIN-DIFF|BINDIFF|BD", \
+ "wlect BIN-DIFF settings binary1 binary2", \
+ "Compare parts of 2 different LECODE binary files. @SETTINGS@ is a" \
+ " string with plus and minus signs to switch between plus/minus modes," \
+ " and some key letters to select parts: s:size, h:header, t:timestamp," \
+ " b:body, p:parameters, d:data, c:code and a:all. In plus-mode, a test" \
+ " is enabled, in minus-mode it is disabled. Scanning starts in" \
+ " plus-mode.\n" \
+ " Example: @a-t@: compare all except timestamps.\n" \
+ " The exist status is @OK@ (0) if nothing differ, @DIFFER@ (2) if at" \
+ " least one test failed, or an error code." )
+
+#:def_cmd( "PATCH", "PATCH|P", \
+ "wlect PATCH [le_bin]...", \
+ "Read each LE-BIN file and patch it. Use {--le-define} to setup cups" \
+ " and tracks." )
+
+#:def_cmd( "LPAR", "LPAR", \
+ "wlect LPAR [le_bin]...", \
+ "Read each LE-BIN file and patch it. Then extract the LE-CODE" \
+ " parameters and store them as LPAR text file. Print the result to" \
+ " standard output if no other destination is defined." )
+
+#:def_cmd( "CREATE", "CREATE|CR", \
+ "wlect CREATE [keyword]", \
+ "Create a file and print it to standard output. The kind of file is" \
+ " defined by KEYWORD. Use command without keywords to get a list of" \
+ " possible keywords.\n" \
+ " The following keywords are possible: @LEX@ for a LEX text file with" \
+ " all known sections except @TEST@. @LEX+@ for a LEX text file with" \
+ " all known sections including @TEST@. @SET1, CANN, HIPT@ and @TEST@" \
+ " (section names) for a LEX text file with 1 section only. @LPAR@ for" \
+ " an example LE-CODE parameter file." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wlect CAT [source]...", \
+ "Read the entered LEX and LE-CODE files (text, binary or szs) and" \
+ " print them as decoded text files to standard output. The output of" \
+ " all source files is concatenated." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wlect DECODE [source]...", \
+ "Read the entered LEX files (text or binary) and decode them to text" \
+ " files. The default destination is @'%P/%N.txt'@." )
+
+#:def_cmd( "ENCODE", "ENCODE|ENC", \
+ "wlect ENCODE source...", \
+ "Read the entered LEX files (text or binary) and encode (compile) them" \
+ " to binary files. The default destination is @'%P/%N.lex'@." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "This option is completely ignored by wlect. It only exists due to" \
+ " compatibility with the other tools." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Suppress cross reference comments." )
+
+#:def_opt( "EXPORT", "X|export", "C", \
+ "", \
+ "Enable the export mode and create small and machine readable text" \
+ " files for easy post processing." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "LT_CLEAR", "lt-clear|ltclear", "C", \
+ "", \
+ "Clear LEX section TEST and remove the section if empty. This option" \
+ " is executed before all other --lt-* options." )
+
+#:def_opt( "LT_ONLINE", "lt-online|ltonline", "CP", \
+ "value", \
+ "Set LEX/TEST parameter OFFLINE-ONLINE to this MODE. MODE is one of" \
+ " @AUTO@ (default), @NEVER@ or @ALWAYS@. If needed, LEX section TEST" \
+ " is created or removed if empty." )
+
+#:def_opt( "LT_N_PLAYERS", "lt-n-players|lt-nplayers|ltnplayers", "CP", \
+ "offline,online", \
+ "Set LEX/TEST parameters N-OFFLINE and N-ONLINE to these integer" \
+ " values. If needed, LEX section TEST is created or removed if empty." )
+
+#:def_opt( "LT_COND_BIT", "lt-cond-bit|lt-condbit|ltcondbit", "GP", \
+ "bitnum", \
+ "Set LEX/TEST parameter COND-BIT to this integer value. Use -1 to" \
+ " deactivate this COND-BIT. If needed, LEX section TEST are created or" \
+ " removed if empty." )
+
+#:def_opt( "LT_GAME_MODE", "lt-game-mode|lt-gamemode|ltgamemode", "GP", \
+ "mode", \
+ "Set LEX/TEST parameter GAME-MODE to this MODE. MODE is one of @AUTO@" \
+ " (default), @Balloon, COIN, VERSUS@ or @ITEMRAIN@. If needed, LEX" \
+ " section TEST is created or removed if empty." )
+
+#:def_opt( "LT_ENGINE", "lt-engine|ltengine", "GP", \
+ "mode", \
+ "Set LEX/TEST parameter ENGINE to this MODE. MODE is one of @AUTO@" \
+ " (default), @BATTLE, 50CC, 100CC, 150CC, 200CC, 150M@ or @200M@. Only" \
+ " track.szs files are modified. If needed, LEX section TEST is created" \
+ " or removed if empty." )
+
+#:def_opt( "LT_RANDOM", "lt-random|ltrandom", "GP", \
+ "index", \
+ "Force a random scenario, if between 1 and 8. Value 0 enables auto" \
+ " selection and -1 disables this option. If needed, LEX section TEST" \
+ " is created or removed if empty." )
+
+#:def_opt( "LEX_PURGE", "lex-purge|lexpurge", "G", \
+ "", \
+ "Delete LEX sections without any impact. This option is executed after" \
+ " all --lt-* options." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "LE_DEFINE", "le-define|ledefine", "CP", \
+ "file", \
+ "Use this file as definition file to patch LE-CODE. The file format" \
+ " can be LE-BIN or any supported CT-CODE file (BRRES, TEX0, CT-CODE or" \
+ " CT-TEXT)." )
+
+#:def_opt( "LPAR", "lpar", "CP", \
+ "file", \
+ "Read a LPAR file to overwrite settings of LE-CODE section LPAR." )
+
+#:def_opt( "ALIAS", "alias", "CP", \
+ "list", \
+ "The parameter is a comma separated list of @SLOT=ALIAS@ elements." \
+ " SLOT defines the slot, for which the ALIAS is defined. ALIAS itself" \
+ " is a slot number to be executed, if SLOT is selected. Empty and" \
+ " invalid elements are ignored. Multiple usage is possible: the lists" \
+ " are concatenated." )
+
+#:def_opt( "ENGINE", "engine", "CP", \
+ "list", \
+ "Define probabilities for engine classes. @LIST@ is a vector for" \
+ " @100cc,150cc,mirror@ If 200cc is enabled by {--200cc}, then vector" \
+ " is interpreted as @150cc,200cc,mirror@. Any numbers are accepted." \
+ " They are normalized to get a total of 100 percent. Use @0,1,0@ to" \
+ " force 150cc only. Use @0,0,0@ to reset to Nintendos VR based choice." )
+
+#:def_opt( "200CC", "200cc", "CO", \
+ "[=mode]", \
+ "Enable or disable 200cc support. Mode is one of @OFF@, @AUTO@" \
+ " (default) or @ON@ (default, if option is used without parameter)." \
+ " LE-CODE hasn't implemented this feature yet!" )
+
+#:def_opt( "PERFMON", "perf-mon|perfmon", "CO", \
+ "[=mode]", \
+ "Enable or disable the performance monitor. Mode is one of @OFF@," \
+ " @AUTO@ (default, don't change setting), @ON@ (enable it for Wii" \
+ " only; default, if option is used without parameter) or @FORCE@" \
+ " (enable it for Wii and for Dolphin)." )
+
+#:def_opt( "CUSTOM_TT", "custom-tt|customtt", "CO", \
+ "[=mode]", \
+ "Enable or disable time trial for custom tracks. Mode is one of @OFF@," \
+ " @AUTO@ (default) or @ON@ (default, if option is used without" \
+ " parameter)." )
+
+#:def_opt( "XPFLAGS", "xpflags", "CO", \
+ "[=mode]", \
+ "Enable or disable support for Extended Presence Flags. Mode is one of" \
+ " @OFF@, @AUTO@ (default) or @ON@ (default, if option is used without" \
+ " parameter). Disable it only for tests!" )
+
+#:def_opt( "TRACK_DIR", "track-dir|trackdir", "CP", \
+ "directory", \
+ "Define a destination directory, where track files are copied, moved" \
+ " or linked to. Usually it is @.../Race/Course/@.\n" \
+ " Files are searched in directories defined by {--copy-tracks}," \
+ " {--move-tracks}, {--move1-tracks} and {--link-tracks} in definition" \
+ " order. Already existing files are removed before operation." )
+
+#:def_opt( "COPY_TRACKS", "copy-tracks|copytracks", "CMP", \
+ "directory", \
+ "Define a search directory for all included tracks. Files found in" \
+ " this directory are copied to the directory specified by option" \
+ " {--track-dir}." )
+
+#:def_opt( "MOVE_TRACKS", "move-tracks|movetracks", "CMP", \
+ "directory", \
+ "Define a search directory for all included tracks. Files found in" \
+ " this directory are moved to the directory specified by option" \
+ " {--track-dir}. If moving fails, the file is copied and the source" \
+ " removed." )
+
+#:def_opt( "MOVE1_TRACKS", "move1-tracks|move1tracks", "CMP", \
+ "directory", \
+ "Define a search directory for all included tracks. Files found in" \
+ " this directory are moved to the directory specified by option" \
+ " {--track-dir}, but only if a file has not more than one hard link." \
+ " This guarantees an unique version of the file. If the file has more" \
+ " hard links or moving fails, the file is copied and the source" \
+ " removed." )
+
+#:def_opt( "LINK_TRACKS", "link-tracks|linktracks", "CMP", \
+ "directory", \
+ "Define a search directory for all included tracks. Files found in" \
+ " this directory are linked to the directory specified by option" \
+ " {--track-dir}. If linking fails, the file is copied." )
+
+#:def_opt( "COMPLETE", "C|complete", "C", \
+ "", \
+ " Append missing sections to the LEX file." )
+
+#:def_opt( "LOAD_BMG", "load-bmg|loadbmg", "CMP", \
+ "file", \
+ "Load immediately the file to fill an internal message pool. The" \
+ " option can be used multiple times to fill the message pool by" \
+ " different sources. A later message overrides the previous message.\n" \
+ " The internal message pool is patched by all {--patch-bmg} options." )
+
+#:def_opt( "PATCH_BMG", "patch-bmg|patchbmg|pb", "CMP", \
+ "mode[cond][=param]", \
+ "This option specifies a BMG patch mode. Some of the modes need a" \
+ " parameter or a file name of a BMG patch file (raw or text BMG), both" \
+ " separated by an equal sign. Modes with required file names are" \
+ " @PRINT, REPLACE, INSERT, OVERWRITE, DELETE, MASK, EQUAL@ and" \
+ " @NOTEQUAL@. Modes with text parameter are @FORMAT@, @REGEXP@ and" \
+ " @RM-REGEXP@. Standalone modes are @ID, ID-ALL, UNICODE, RM-ESCAPES," \
+ " RM-CUPS, CT-COPY, CT-FORCE-COPY, CT-FILL, LE-COPY, LE-FORCE-COPY," \
+ " LE-FILL, X-COPY, X-FORCE-COPY@ and @X-FILL@. Unique abbreviations" \
+ " are allowed.\n" \
+ " The optional condition @COND@ is either '@?MID@' or '@!MID@'. In" \
+ " case of '@?MID@', the patch is only applied if the message id MID" \
+ " already exists. In case of '@!MID@', the patch is only applied if" \
+ " the message id MID does not exists.\n" \
+ " If this option is used multiple times, all patch files will be" \
+ " processed in the entered order." )
+
+#:def_opt( "MACRO_BMG", "macro-bmg|macrobmg|mb", "CMP", \
+ "file", \
+ "Load a BMG file and add the messages to the macro library; already" \
+ " existing entries are replaced. The macro library is accessed by" \
+ " escape sequence @\\m{{MID}@ as fallback, if the active file has not" \
+ " already defined the message @MID@ by itself." )
+
+#:def_opt( "PATCH_NAMES", "patch-names|patchnames", "C", \
+ "", \
+ "If set, the names of the CUP1 and CSR1 sections are patched by the" \
+ " loaded BMG files directly after loading the source files." )
+
+#:def_opt( "ORDER_BY", "order-by|orderby|order", "CP", \
+ "bmg", \
+ "Load the BMG file and filter track names. Then before creating output" \
+ " files, re-distribute the tracks of the additonal cups (9-) to the" \
+ " same cups by the order of the read track names. Tracks without BMG" \
+ " reference are placed at the end of all tracks. This option modifes" \
+ " only the track order of the cups, but will not change any name." )
+
+#:def_opt( "ORDER_ALL", "order-all|orderall", "C", \
+ "", \
+ "Used together with option {--order-by}: Re-distribute the tracks of" \
+ " all cups beginning with Mushroom Cup." )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LE_DEFINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LPAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ALIAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "200CC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "PERFMON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "CUSTOM_TT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "XPFLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LONG", \
+ "", \
+ "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \
+ " each track, property and music slot is printed in brackets. If set" \
+ " twice, print a track list too.\n" \
+ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \
+ " of the element data. If set twice, print a hex dump of max 64 bytes" \
+ " (4 lines). If set 3 times ore more, print a complete hex dump." )
+
+#:def_cmd_opt( "DUMP", "VERBOSE", \
+ "", \
+ "For LE-CODE binaries: If set, print a track slot usage table." )
+
+#:def_cmd_opt( "DL", "LE_DEFINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "LPAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "ALIAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "200CC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "PERFMON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "CUSTOM_TT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "XPFLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DL", "LONG", \
+ "", \
+ "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \
+ " each track, property and music slot is printed in brackets. If set" \
+ " twice, print a track list too.\n" \
+ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \
+ " of the element data. If set twice, print a hex dump of max 64 bytes" \
+ " (4 lines). If set 3 times ore more, print a complete hex dump." )
+
+#:def_cmd_opt( "DL", "VERBOSE", \
+ "", \
+ "For LE-CODE binaries: If set, print a track slot usage table." )
+
+#:def_cmd_opt( "DLL", "LE_DEFINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "LPAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "ALIAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "200CC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "PERFMON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "CUSTOM_TT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "XPFLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DLL", "LONG", \
+ "", \
+ "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \
+ " each track, property and music slot is printed in brackets. If set" \
+ " twice, print a track list too.\n" \
+ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \
+ " of the element data. If set twice, print a hex dump of max 64 bytes" \
+ " (4 lines). If set 3 times ore more, print a complete hex dump." )
+
+#:def_cmd_opt( "DLL", "VERBOSE", \
+ "", \
+ "For LE-CODE binaries: If set, print a track slot usage table." )
+
+#:def_cmd_opt( "BIN_DIFF", "QUIET", \
+ "", \
+ "Suppress all messages and tell result as exit status only." )
+
+#:def_cmd_opt( "BIN_DIFF", "VERBOSE", \
+ "", \
+ "Be more verbose and tell, what tests are planned." )
+
+#:def_cmd_opt( "PATCH", "LE_DEFINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LPAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALIAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "200CC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PERFMON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "CUSTOM_TT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "XPFLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TRACK_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "COPY_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MOVE_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MOVE1_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "LINK_TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "LE_DEFINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "LPAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "ALIAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "200CC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "PERFMON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "CUSTOM_TT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "XPFLAGS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in LE text files." )
+
+#:def_cmd_opt( "LPAR", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "LPAR", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in LE text files." )
+
+#:def_cmd_opt( "CREATE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LPAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_CLEAR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_ONLINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_N_PLAYERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_COND_BIT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_GAME_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_ENGINE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LT_RANDOM", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CREATE", "LEX_PURGE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "COMPLETE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in LE text files." )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "COMPLETE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in LE text files." )
+
+#:def_cmd_opt( "DECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "EXPORT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "COMPLETE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wmdlt' ###############
+###############################################################################
+
+#:def_tool( "wmdlt", \
+ "wmdlt [option]... command [option|parameter|@file]...", \
+ "Wiimms MDL Tool : Decode raw MDL and encode text MDL files." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wmdlt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wmdlt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wmdlt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wmdlt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wmdlt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wmdlt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wmdlt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wmdlt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wmdlt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wmdlt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wmdlt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wmdlt SYMBOLS", \
+ "Print predefined symbols of text parser to standard output. The MDL" \
+ " specific symbols are included." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wmdlt FUNCTIONS [key]...", \
+ "Print a list with all parser functions including the MDL specific" \
+ " functions. If one key ore more key entered, then only functions that" \
+ " match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wmdlt CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "MATRIX", "MATRIX", \
+ "wmdlt MATRIX [patch-option]... [vector]...", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results.", \
+ "Use the transformation options as base and calculate and print the" \
+ " related vectors and the transformation matrices. Then do a forward" \
+ " and backward transformation for each @vector@ parameter using the" \
+ " matrices and print the results. The transformations are done with 4" \
+ " different methods to confirm the algorithms. Only the main results" \
+ " and results, which differ, are printed.\n" \
+ " Normally, the exit status is @OK@ (null). If at least one old" \
+ " transformation returns different results for the different" \
+ " algorithms, then status @DIFFER@ (not null) is returned." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wmdlt FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wmdlt CAT [source]...", \
+ "Read the entered MDL files (text or binary) and print them as decoded" \
+ " text files to standard output (stdout). The output of all source" \
+ " files is concatenated.\n" \
+ " A decoded MDL0 file can only be used for analysis. Encoding or" \
+ " creating a new MDL0 file is not supported." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wmdlt DECODE [source]...", \
+ "Read the entered MDL files (text or binary) and decode them to text" \
+ " files. The default destination is @'%P/%N.txt'@.\n" \
+ " A decoded MDL0 file can only be used for analysis. Encoding or" \
+ " creating a new MDL0 file is not supported." )
+
+#:def_cmd( "STRINGS", "STRINGS", \
+ "wmdlt STRINGS [source]...", \
+ "Read the entered MDL files (text or binary) and print all strings of" \
+ " all sections.\n" \
+ " For archives like SZS or BREES, the strings of each containing MDL" \
+ " are printed. It is also possible to address an internal sub-file" \
+ " like @track.szs/course_model.brres@." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "This option is completely ignored by wlect. It only exists due to" \
+ " compatibility with the other tools." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "MDL", "mdl", "GP", \
+ "list", \
+ "Set global options for MDL processing. To enable MDL patching, use" \
+ " option {--patch-file} and select BRRES files for patching.\n" \
+ " Parameter @'list'@ is a comma separated list of keywords. A minus" \
+ " sign before a keyword disables a setting. Each occurrence of the" \
+ " option will only change entered settings and all other settings are" \
+ " untouched.\n" \
+ " A MDL transformation (controlled by the transformation options) is" \
+ " only done, if at least one of the keywords @VECTOR@ or @VERTEX@ is" \
+ " set.\n" \
+ " Keyword @DEFAULT@ resets the default settings (@VERTEX@) and" \
+ " @CLEAR@ disables all. The other allowed keywords are: @VECTOR," \
+ " MATRIX, VERTEX, PARENT, CHILD@ and @LOG@." )
+
+#:def_opt( "SCALE", "scale", "CP", \
+ "vector[@origin]", \
+ "Transform the data: Scale all coordinates and size values by 'vector'" \
+ " relative to the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Negative values mirror the coordinates. Each parameter is either a" \
+ " vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "SHIFT", "shift", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--translate}, but the addition is done before rotation. The" \
+ " parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XSS", "xss", "CP", \
+ "x1old,x1new,x2old,x2new", \
+ "--xss (x-scale-shift) calculates the X values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "YSS", "yss", "CP", \
+ "y1old,y1new,y2old,y2new", \
+ "--yss (y-scale-shift) calculates the Y values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ZSS", "zss", "CP", \
+ "z1old,z1new,z2old,z2new", \
+ "--zss (z-scale-shift) calculates the Z values of {--scale} and" \
+ " {--shift}, so that old values are transformed to the new values. The" \
+ " parameters are numbers or expression." )
+
+#:def_opt( "ROT", "rot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' (is a vector) around the 3 axes. All 3 axes goes" \
+ " through the point 'origin'. If the origin is not set, @0,0,0@ is" \
+ " used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y,z').\n" \
+ " Option --rot is an alternative for {--xrot}, {--yrot} and {--zrot}" \
+ " to define all 3 rotations in one step. Transformations are" \
+ " calculated in the order SCALE, SHIFT, X-ROTATE, Y-ROTATE, Z-ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "XROT", "xrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('y,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "YROT", "yrot|hrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the x-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead. This is" \
+ " a horizontal counterclockwise rotation and the old option name" \
+ " --hrot can also used.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,z' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "ZROT", "zrot", "CP", \
+ "degree[@origin]", \
+ "Transform the data: Rotate all coordinates and rotation values by the" \
+ " angle 'degree' around the z-axis, that goes through the point" \
+ " 'origin'. If the origin is not set, @0,0,0@ is used instead.\n" \
+ " Each parameter is either a vector expression or a comma separated" \
+ " expression list of coordinates ('x,y' or 'x,y,z').\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, X-ROTATE," \
+ " Y-ROTATE, Z-ROTATE, TRANSLATE." )
+
+#:def_opt( "TRANSLATE", "translate", "CP", \
+ "vector", \
+ "Transform the data: Add 'vector' to all coordinates. It's simlar to" \
+ " {--shift}, but the addition is done after rotation. The parameter is" \
+ " either a vector expression or a comma separated expression list of" \
+ " coordinates ('x,z' or 'x,y,z'). @--trans@ is a short cut.\n" \
+ " Transformations are calculated in the order SCALE, SHIFT, ROTATE," \
+ " TRANSLATE." )
+
+#:def_opt( "NULL", "null", "C", \
+ "", \
+ "Create a neutral transformation without affecting the coordinates." \
+ " The only influence is, that the dependent values (like maximum) are" \
+ " re-calculated as if a transformation has taken place." )
+
+#:def_opt( "NEXT", "next", "C", \
+ "", \
+ "Close the current transformation step with all scaling, shifting," \
+ " rotation and translation options and open a new step with cleared" \
+ " options. On transformation each step is logical done one by one. In" \
+ " real, one total transformation matrix is calculated and used for" \
+ " fast transformations.\n" \
+ " If option --next is used, the ability for modifying the scale and" \
+ " rotation vectors (not the positions) of different KMP sections is" \
+ " nearly always lost. A warning is printed if this occurs." )
+
+#:def_opt( "ASCALE", "ascale", "CP", \
+ "factor@dir", \
+ "Transform the data and do an axis scale: Close the current" \
+ " transformation step like {--next} and scale the data by @'factor'@" \
+ " into the direction given by the vector @'dir'@. Store the resulting" \
+ " matrix as single transformation step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "AROT", "arot", "CP", \
+ "degree[@pos1]@pos2", \
+ "Transform the data and do an axis rotation: Close the current" \
+ " transformation step like {--next} and rotate the data by @'degree'@" \
+ " around the axis defined by the 2 points. If @'pos1'@ is not set, use" \
+ " @0,0,0@ instead. Store the resulting matrix as single transformation" \
+ " step and open a new one.\n" \
+ " This kind of transformation is EXPERIMENTAL!" )
+
+#:def_opt( "TFORM_SCRIPT", "tform-script|tformscript", "CP", \
+ "script", \
+ "Load the script and execute it by the text parser.\n" \
+ " Then for each coordinate (2D and 3D), call the macro @TRANSFORM@" \
+ " after all other transformations. Call it without parameters and set" \
+ " variable @$$I@ with a zero based index of all vertices, variable" \
+ " @$$D@ to the dimension (2 or 3) and the variable @$$P@ to the vector" \
+ " of the current vertex. If the macro returns a vector, it is the new" \
+ " position.\n" \
+ " For each file, macro @BEGIN@ is called at the beginning and @END@" \
+ " after processing all points, but only, if the macros are defined." \
+ " For @END@, variable @$$I@ is set to the number of processed vertices" \
+ " in the current file.\n" \
+ " Before each macro call, the private and local variables are cleared" \
+ " and only global parameters are permanent. The zero based index is" \
+ " cleared for each new source. The parameters of the macro calls are" \
+ " defined in the local name space." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Suppress cross reference comments." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "NO_CHECK", "N|no-check|nocheck", "C", \
+ "", \
+ "Do not make plausibility checks for KMP files." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "TINY", "tiny", "GP", \
+ "mode", \
+ "Set tiny mode to a level between 0 and 7." )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TEST", "VERBOSE", \
+ "", \
+ "Print the matrices of transformations." )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "MATRIX", "BRIEF", \
+ "", \
+ "If set once, suppress vector dumps for transformation steps and" \
+ " ignore option --long. If set twice, suppress vector dump for final" \
+ " transformation too." )
+
+#:def_cmd_opt( "MATRIX", "LONG", \
+ "", \
+ "If set once, print inverse matrix for the final transformation. If" \
+ " set twice, print inverse matrix for all transformations." )
+
+#:def_cmd_opt( "MATRIX", "QUIET", \
+ "", \
+ "Option --quiet is dedicated to automatic tests comparing the old and" \
+ " new transformation algorithms. If set once, the tables are only" \
+ " printed, if the results differ. If set twice, nothing is printed at" \
+ " all and only the exit status will inform about the results." )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in MDL text files." )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in MDL text files." )
+
+#:def_cmd_opt( "DECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in MDL text files." )
+
+#:def_cmd_opt( "STRINGS", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "STRINGS", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in MDL text files." )
+
+#:def_cmd_opt( "GEOMETRY", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "GEOMETRY", "MDL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in MDL text files." )
+
+#:def_cmd_opt( "XTEST", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "SCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "SHIFT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "XSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "YSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "ZSS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "ROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "XROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "YROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "ZROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "TRANSLATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "ASCALE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "AROT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "TFORM_SCRIPT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "NEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "XTEST", "MDL", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wpatt' ###############
+###############################################################################
+
+#:def_tool( "wpatt", \
+ "wpatt [option]... command [option|parameter|@file]...", \
+ "Wiimms PAT Tool : Decode raw PAT and encode text PAT files." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wpatt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wpatt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wpatt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wpatt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wpatt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wpatt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wpatt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wpatt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wpatt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wpatt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wpatt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "SYMBOLS", "SYMBOLS", \
+ "wpatt SYMBOLS", \
+ "Print predefined symbols of text parser to standard output. The PAT" \
+ " specific symbols are included." )
+
+#:def_cmd( "FUNCTIONS", "FUNCTIONS", \
+ "wpatt FUNCTIONS [key]...", \
+ "Print a list with all parser functions including the PAT specific" \
+ " functions. If one key ore more key entered, then only functions that" \
+ " match at least one key are printed." )
+
+#:def_cmd( "CALCULATE", "CALCULATE", \
+ "wpatt CALCULATE expression...", \
+ "Calculate each expression and print the result to standard output." )
+
+#:def_cmd( "FLOAT", "FLOAT", \
+ "wpatt FLOAT number...", \
+ "This commands helps to convert hex values into floating point numbers" \
+ " and vice versa. For each non empty parameter, a line with 4 bytes" \
+ " hex and a float, 8 bytes hex and a double float, and the parameter" \
+ " itself is printed. If a parameter begins with 'x' or '0x', it is a" \
+ " hex string, otherwise it is a floating point number.\n" \
+ " The special parameters \"+\" and \"-\" mean: Increment or decrement" \
+ " the previous value by the smallest possible value. Use different" \
+ " increments for floats and doubles.\n" \
+ " All conversions are done using big endian." )
+
+#:def_cmd( "CAT", "CAT", \
+ "wpatt CAT [source]...", \
+ "Read the entered PAT files (text or binary) and print them as decoded" \
+ " text files to standard output (stdout). The output of all source" \
+ " files is concatenated." )
+
+#:def_cmd( "DECODE", "DECODE|DEC", \
+ "wpatt DECODE [source]...", \
+ "Read the entered PAT files (text or binary) and decode them to text" \
+ " files. The default destination is @'%P/%N.txt'@." )
+
+#:def_cmd( "ENCODE", "ENCODE|ENC", \
+ "wpatt ENCODE [source]...", \
+ "Read the entered PAT files (text or binary) and encode (compile) them" \
+ " to binary files. The default destination is @'%P/%N.pat'@." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "This option is completely ignored by wlect. It only exists due to" \
+ " compatibility with the other tools." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "ROUND", "round", "C", \
+ "", \
+ "Print additional lines with rounded values (to 3 and 2 bytes for" \
+ " floats and 7 and 6 bytes for doubles)." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "Suppress cross reference comments." )
+
+#:def_opt( "NO_PARAM", "P|no-param|noparam", "C", \
+ "", \
+ "Disable parameter support in decoded KMP text files." )
+
+#:def_opt( "NO_ECHO", "no-echo|noecho", "C", \
+ "", \
+ "Suppress output of @@ECHO commands while scanning text files." )
+
+#:def_opt( "NO_CHECK", "N|no-check|nocheck", "C", \
+ "", \
+ "Do not make plausibility checks for KMP files." )
+
+#:def_opt( "MAX_FILE_SIZE", "M|max-file-size|maxfilesize", "GP", \
+ "size", \
+ "This security option defines the maximum file size for input files;" \
+ " larger files are ignored with a warning. The default unit is MiB and" \
+ " the default size is 100 MiB; that should be enough for standard" \
+ " usage." )
+
+#:def_opt( "PAT", "pat", "GP", \
+ "list", \
+ "Set global options for PAT processing. Parameter @'list'@ is a comma" \
+ " separated list of keywords. A minus sign before a keyword disables a" \
+ " setting. Each occurrence of the option will only change entered" \
+ " settings and all other settings are untouched.\n" \
+ " Keyword @DEFAULT@ resets the default settings and @CLEAR@ disables" \
+ " all. The other allowed keywords are: @AUTO, SIMPLE, COMPLEX, BOTH," \
+ " SILENT@ and @LOG@." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "SYMBOLS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FUNCTIONS", "BRIEF", \
+ "", \
+ "Suppress the output of the description and print only function type" \
+ " and syntax." )
+
+#:def_cmd_opt( "FUNCTIONS", "LONG", \
+ "", \
+ "Usually only the function syntax is compared to the keywords. But if" \
+ " --long is set, the descriptions are compared too." )
+
+#:def_cmd_opt( "CALCULATE", "CONST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FLOAT", "ROUND", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in PAT text files." )
+
+#:def_cmd_opt( "CAT", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "CAT", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_HEADER", \
+ "", \
+ "Suppress the syntax information section in PAT text files." )
+
+#:def_cmd_opt( "DECODE", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DECODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_ECHO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "NO_CHECK", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ENCODE", "IGNORE", \
+ "", \
+ "" )
+
+
+##
+###############################################################################
+############### Tool 'wstrt' ###############
+###############################################################################
+
+#:def_tool( "wstrt", \
+ "wstrt [option]... command [option|parameter|@file]...", \
+ "Wiimms StaticR Tool : Manipulate the 'main.dol' and 'StaticR.rel'" \
+ " files of Mario Kart Wii." )
+
+#:def_cmd( "VERSION", "VERSION", \
+ "wstrt VERSION [ignored]...", \
+ "Print program name and version and exit." )
+
+#:def_cmd( "HELP", "HELP|H|?", \
+ "wstrt HELP [--width=wd] OPT|OPTION ...\n" \
+ "wstrt HELP [--width=wd] CMD|COMMAND [ignored]...\n" \
+ "wstrt HELP [--width=wd] command [-b] [ignored]...\n" \
+ "wstrt HELP [--width=wd] [ignored]...", \
+ "Print help for commands and options.", \
+ "Print help for commands and options.\n" \
+ " The first variant (with keyword @OPT@ or @OPTION@) prints a list of" \
+ " all global and command specific options. If at least one option is" \
+ " set, only info about the declared options are printed. The second" \
+ " variant (with keyword @CMD@ or @COMMAND@) prints an overview about" \
+ " all commands. The third variant (with a valid command name) prints" \
+ " details about the declared command. The fourth variant prints an" \
+ " overview about all commands and all global options." )
+
+#:def_cmd( "ARGTEST", "ARGTEST", \
+ "wstrt ARGTEST ...", \
+ "This debug command accepts all kinds of parameters and prints one" \
+ " line for each parameter." )
+
+#:def_cmd( "TEST", "TEST", \
+ "wstrt TEST [options]... [ignored]...", \
+ "This debugging command accepts all options and parameters and prints" \
+ " a list of the internal option values. The command is designed to" \
+ " test the option parameters. The non option parameters are completely" \
+ " ignored." )
+
+#:def_cmd( "COLORS", "COLORS", \
+ "wstrt COLORS", \
+ "Ignore all parameters and print colored text for testing." )
+
+#:def_cmd( "ERROR", "ERROR|ERR", \
+ "wstrt ERROR [error_code]", \
+ "Translate an exit code to a message name. If no exit code is entered," \
+ " print a table with all error messages." )
+
+#:def_cmd( "FILETYPE", "FILETYPE|FT", \
+ "wstrt FILETYPE file...", \
+ "Scan the header of the entered files and print file type and path for" \
+ " each file as list." )
+
+#:def_cmd( "FILEATTRIB", "FILEATTRIB|FA", \
+ "wstrt FILEATTRIB [keyword]...", \
+ "Print a table with attributes for all known file types. If at least" \
+ " one keyword is entered, only matching file types are printed. A" \
+ " keyword is either a file type (like 'BRRES' or 'BMG') or one of the" \
+ " printed keywords (like 'ARCHIVE' or 'EXTRACT')." )
+
+#:def_cmd( "DUMP", "DUMP", \
+ "wstrt DUMP file...", \
+ "Dump the structure of 'StaticR.rel' (in development) and of DOL files" \
+ " as text." )
+
+#:def_cmd( "HEXDUMP", "HEXDUMP|XDUMP", \
+ "wstrt HEXDUMP file...", \
+ "Dump the content of DOL files as hex dump and use virtual addresses." \
+ " Select parts by --vaddr, --faddr and --sname. Without selectors, the" \
+ " whole file is dumped." )
+
+#:def_cmd( "EXTRACT", "EXTRACT|X", \
+ "wstrt EXTRACT dol...", \
+ "Extract the sections of a DOL file into a directory. StaticR.rel" \
+ " files are ignored." )
+
+#:def_cmd( "TRACKS", "TRACKS", \
+ "wstrt TRACKS [file]...", \
+ "Show track infos in the order of the 'StaticR.rel' files. If no file" \
+ " is entered, the standard order is used." )
+
+#:def_cmd( "ARENAS", "ARENAS", \
+ "wstrt ARENAS [file]...", \
+ "Show arena infos in the order of the 'StaticR.rel' files. If no file" \
+ " is entered, the standard order is used." )
+
+#:def_cmd( "FILES", "FILES", \
+ "wstrt FILES [file]...", \
+ "List track and arena file names in machine readable format. Use the" \
+ " order of the entered 'StaticR.rel' files. If no file is entered, the" \
+ " standard order is used." )
+
+#:def_cmd( "FIND", "FIND", \
+ "wstrt FIND [+]TRACK keyword...\n" \
+ "wstrt FIND [+]ARENA keyword...", \
+ "Find a track or arena by keyword and print one line for each keyword" \
+ " in machine readable format @'type slot'@ or, if not found, a simple" \
+ " @'-'@. The name is searched in the entered context (tracks or" \
+ " arenas). If @TRACK@ or @ARENA@ is prefixed by a plus, then a failed" \
+ " search will be continued in the other context. If at least one name" \
+ " is not found, the tool terminates with exit code @NOT_EXISTS@." )
+
+#:def_cmd( "POINTS", "POINTS|PTS", \
+ "wstrt POINTS [--points=list] [file]...", \
+ "Print a table with the points assigned to player after a versus or" \
+ " room race for each entered file. If no file is entered, the standard" \
+ " table is used. However, if option {--points} is set only the" \
+ " resulting table is printed." )
+
+#:def_cmd( "ANALYZE", "ANALYZE|ANA|ANALYSE", \
+ "wstrt ANALYZE [file]...", \
+ "Open 'StaticR.rel' and DOL files and analyze them. The files will be" \
+ " classified using SHA1 checksums." )
+
+#:def_cmd( "PATCH", "PATCH", \
+ "wstrt PATCH [file]...", \
+ "Patch 'main.dol and 'StaticR.rel' files of Mario Kart Wii. No backup" \
+ " is made." )
+
+#:def_opt( "VERSION", "V|version", "G", \
+ "", \
+ "Stop parsing the command line, print a version info and exit." )
+
+#:def_opt( "HELP", "h|help", "G", \
+ "", \
+ "Stop parsing the command line, print a help message and exit." )
+
+#:def_opt( "XHELP", "xhelp", "G", \
+ "", \
+ "Stop parsing the command line and print a help message with all" \
+ " commands included. Exit after printing." )
+
+#:def_opt( "ALLOW_ALL", "allow-all|allowall", "G", \
+ "", \
+ "Usually commands accept only options with impact to the command. All" \
+ " other options fire a syntax error. But if @--allow-all@ is set, all" \
+ " commands accept all options.\n" \
+ " This makes changing the command of a long command line without" \
+ " removing useless options easier. It also helps to override wrong" \
+ " option permissions." )
+
+#:def_opt( "COMPATIBLE", "compatible", "GP", \
+ "vers", \
+ "The option expects a version number (format @'#.##'@ or @'v#.##'@) or" \
+ " a revision number (format @'r#'@) as parameter. If set, the tools" \
+ " try to create BMG and KMP text files, that are compatible to the" \
+ " entered version of the tools. This may override other legacy" \
+ " options." )
+
+#:def_opt( "WIDTH", "width", "GP", \
+ "width", \
+ "Define the terminal width (number of columns) for help and some other" \
+ " messages and disable the automatic detection of the terminal width." )
+
+#:def_opt( "QUIET", "q|quiet", "GM", \
+ "", \
+ "Be quiet and print only error messages. Multiple usage is possible." \
+ " The impact is command dependent. In general: If set three times," \
+ " different file format warnings are suppressed." )
+
+#:def_opt( "VERBOSE", "v|verbose", "GM", \
+ "", \
+ "Be verbose and print more progress information. Multiple usage is" \
+ " possible. The impact is command dependent." )
+
+#:def_opt( "LOGGING", "L|logging", "GM", \
+ "", \
+ "This debug option enables the logging of internal lists and maps." )
+
+#:def_opt( "DE", "de", "G", \
+ "", \
+ "Use german track and arena names." )
+
+#:def_opt( "COLORS", "colors", "GO", \
+ "[=modus]", \
+ "Define the modus for colored text output. Allowed keywords are: @OFF@" \
+ " or @NO-COLORS@ to disable colors, @AUTO@ (default) for automatic" \
+ " detection, @ON@ for automatic detection but never @OFF@, @8-COLORS@" \
+ " and @256-COLORS@ to force 8 or 256 color support. Without parameter," \
+ " @ON@ is used.\n" \
+ " @AUTO@ will enable colorized output only for terminals. @AUTO@ and" \
+ " @ON@ use environment variable @TERM@ to find the correct color" \
+ " modus.\n" \
+ " If a command is prefixed by @'C-'@, then @--color=ON@ is used" \
+ " implicitly as default." )
+
+#:def_opt( "NO_COLORS", "no-colors|nocolors", "G", \
+ "", \
+ "Deactive colorized text. This is the default, if an output file is" \
+ " not a terminal." )
+
+#:def_opt( "CT_CODE", "ct-code|ctcode", "G", \
+ "", \
+ "Enable CT-CODE support." )
+
+#:def_opt( "LE_CODE", "le-code|lecode", "GO", \
+ "[=param]", \
+ "This option is completely ignored by wlect. It only exists due to" \
+ " compatibility with the other tools." )
+
+#:def_opt( "CHDIR", "chdir", "GMP", \
+ "dir", \
+ "Set a new working directory for all following options, for all" \
+ " parameters and for the command execution. This option can be used" \
+ " multiple times, but for parameter parsing and for command execution" \
+ " only the last usage is relevant. Nevertheless, @'@@param'@ values" \
+ " are scanned while reading the command line." )
+
+#:def_opt( "CONST", "c|const", "GMP", \
+ "list", \
+ "Define constant values, that are used by the internal encoders and by" \
+ " the numeric options as predefined global variables. This option" \
+ " allows a conditional encoding of text files. It can be used multiple" \
+ " times for multiple definitions.\n" \
+ " The parameter is a comma separated list of terms and a term is" \
+ " '@name=expression@'. The expression is calculated by the text" \
+ " parser." )
+
+#:def_opt( "LONG", "l|long", "CM", \
+ "", \
+ "Print long numeric message IDs instead of alternative message names" \
+ " like Txx, Uxx or Mxx." )
+
+#:def_opt( "BRIEF", "B|brief", "C", \
+ "", \
+ "List only the track file names and suppress table header and footer." )
+
+#:def_opt( "NO_HEADER", "H|no-header|noheader", "C", \
+ "", \
+ "Suppress the syntax information section in BMG text files." )
+
+#:def_opt( "TRACKS", "T|tracks", "GP", \
+ "tracks", \
+ "Define a new track order. A comma separated list in the format" \
+ " @[a=]b@ or @a:=b@ is expected. @'a'@ and @'b'@ are track names or" \
+ " slot numbers. @'a'@ is the destination slot and @'b'@ the assigned" \
+ " track. If @'a'@ is omitted, the next slot is used; this means" \
+ " @[a=]b,c,d@ is possible.\n" \
+ " Tracks will only be exchanged so that always all tracks are" \
+ " assigned. But if using @':='@ the new slots are assigned without" \
+ " exchanging and the old values are lost." )
+
+#:def_opt( "ARENAS", "A|arenas", "GP", \
+ "arenas", \
+ "Define a new arena order. A comma separated list in the format" \
+ " @[a=]b@ or @a:=b@ is expected. @'a'@ and @'b'@ are arena names or" \
+ " slot numbers. @'a'@ is the destination slot and @'b'@ the assigned" \
+ " arena. If @'a'@ is omitted, the next slot is used; this means" \
+ " @[a=]b,c,d@ is possible.\n" \
+ " Arenas will only be exchanged so that always all arenas are" \
+ " assigned. But if using @':='@ the new slots are assigned without" \
+ " exchanging and the old values are lost." )
+
+#:def_opt( "REGION", "R|region", "GP", \
+ "region", \
+ "If 'region' is an unsigned number, the region for online versus races" \
+ " and for battles is patched to the entered number. If the number is" \
+ " prefixed by the letter @'t'@, a test mode is enabled and the places" \
+ " are patched with ascending numbers. You can patch StaticR.rel and" \
+ " main.dol.\n" \
+ " Otherwise a keyword is expected. Official regions are: @JAPAN(0)," \
+ " AMERICA(1), EUROPE(2), AUSTRALIA(OCEANIA,3), KOREA(4), TAIWAN(5)@" \
+ " and @CHINA(6)@. @RESTORE@ restores the original Nintendo values and" \
+ " @NONE@ disables region patching (default).\n" \
+ " See https://wiimmfi.de/reg-list for other regions." )
+
+#:def_opt( "VS_REGION", "vs-region|vsregion|vregion", "GP", \
+ "region", \
+ "Same as {--region}, but only for online versus races." )
+
+#:def_opt( "BT_REGION", "bt-region|btregion|bregion", "GP", \
+ "region", \
+ "Same as {--region}, but only for online battles." )
+
+#:def_opt( "ALL_RANKS", "all-ranks|allranks", "GO", \
+ "[=mode]", \
+ "If set to @ON@ (default without parameter), the server query to" \
+ " Nintendos servers is manipulated, so that the player will find all" \
+ " players in online races independent of their ranking points. Value" \
+ " @RESTORE@ disables this feature and restores Nintendos original" \
+ " query. Value @NONE@ disables this kind of patching (default)." )
+
+#:def_opt( "POINTS", "points|pts", "GP", \
+ "list", \
+ "This patch option defines a new table for the points assigned to" \
+ " players after a versus or room race. The parameter is a blank or" \
+ " comma and slash (next row) separated list with numbers (points)" \
+ " between 0 and 255 and the following keywords: @NINTENDO, LINEAR," \
+ " WIN, WIN15, WIN25@ to select a predefined table; @NO-BONUS, BONUS," \
+ " NULL, ONE@ as options; @N1..N12@ to select the row for N players." )
+
+#:def_opt( "HTTPS", "https", "GP", \
+ "mode", \
+ "Patch the https strings of REL and DOL files. 'mode' is one of the" \
+ " following keywords:\n" \
+ "@RESTORE@ restores the original URLs and domains.\n" \
+ "@HTTP@ replaces HTTPS requests by HTTP and sub-domain '@naswii.@' by" \
+ " '@nas.@'.\n" \
+ "@DOMAIN@ replace HTTPS requests by HTTP and the domain" \
+ " '@nintendowifi.net@' by a domain specified by option {--domain}.\n" \
+ "@SAKE0@ same as DOMAIN, but don't replace URLs with SAKE domain.\n" \
+ "@SAKE1@ same as SAKE0, but replace HTTPS of SAKE domains." )
+
+#:def_opt( "DOMAIN", "domain", "GP", \
+ "dom", \
+ "Define a domain for option {--https}. The default is '@wiimmfi.de@'." )
+
+#:def_opt( "WIIMMFI", "wiimmfi", "G", \
+ "", \
+ "Patch the files for the new custom server. It is a short cut for" \
+ " {--https domain --domain wiimmfi.de}." )
+
+#:def_opt( "WC24", "wc24", "G", \
+ "", \
+ "Exclude 2 strings of file StaticR.rel from --wiimmfi and --domain" \
+ " patch to enable WC24 support." )
+
+#:def_opt( "PB_MODE", "pb-mode|pbmode", "GP", \
+ "mode", \
+ "Mode for the patched-by string: @OFF@ disables modifications. @RESET@" \
+ " resets the string to stars. @WIIMMFI@ defines it only, if patched" \
+ " for Wiimmfi. @AUTO@ (default) defines it only, if patched. @ALWAYS@" \
+ " defines it always." )
+
+#:def_opt( "VS", "vs", "GP", \
+ "char", \
+ "Reset (str is empty) or replace the second character of 'vs' to" \
+ " create an own online world for versus races. The file StaticR.rel" \
+ " will be patched at 4 places." )
+
+#:def_opt( "BT", "bt", "GP", \
+ "char", \
+ "Reset (str is empty) or replace the second character of 'bt' to" \
+ " create an own online world for battles. The file StaticR.rel will be" \
+ " patched at 4 places." )
+
+#:def_opt( "CANNON", "cannon", "GP", \
+ "idx,p1,p2,p3,p4", \
+ "Patch parameters for cannon with index IDX (0..2). Parameters P1..P4" \
+ " are floating point numbers. Repeat this option for each cannon, that" \
+ " should be modified." )
+
+#:def_opt( "MENO", "meno", "G", \
+ "", \
+ "Patch some 'MenuSingle' and 'MenuMulti' strings of file StaticR.rel" \
+ " for online usage to 'MenO*' (MenuOnline) to distinguish between" \
+ " offline and online races." )
+
+#:def_opt( "TEST", "t|test", "GM", \
+ "", \
+ "Run in test mode, modify nothing.\n" \
+ ">>> USE THIS OPTION IF UNSURE! <<<" )
+
+#:def_opt( "FORCE", "force", "GM", \
+ "", \
+ "The tools analyse input files and reject files with invalid data" \
+ " structures. If --force is set, little repairable issues are ignored" \
+ " and a warning is printed.\n" \
+ "Option {--kmp force} does the same, but only for KMP files.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "REPAIR_MAGICS", "repair-magics|repairmagics", "GO", \
+ "[=mode]", \
+ "Control the reparing of missing or wrong magics of files and" \
+ " sub-files by analysing file path and file extension. @MODE@ is one" \
+ " of @OFF@ (default), @ANALYZE@ or @REPAIR@ (default, if set without" \
+ " mode). @OFF@ disables this feature, @ANALYZE@ enables it for" \
+ " analysis only, and @REPAIR@ repairs all magics while reading the" \
+ " files. Keyword @FNAME@ can be appended (separated by a comma) to" \
+ " give filename scanning the highest priority.\n" \
+ ">>> THE RESULT MAY BE INVALID OUTPUT FILES! <<<" )
+
+#:def_opt( "DEST", "d|dest", "CP", \
+ "path", \
+ "Define a destination path (directory/file). The destination @-@" \
+ " means: write to standard output.\n" \
+ " The path may contain escape sequences: @%Q@ is replaced by the" \
+ " fully qualified source name. @%P@ and @%F@ are replaced by the" \
+ " source path or by the filename. @%N@ and @%E@ are replaced by source" \
+ " filename without extension or by the source extension. Finally, @%T@" \
+ " is replaced by the default extension of the destination format.\n" \
+ " A @'?'@ direct behind @'%'@ in @%E@ and @%T@ conversions avoid that" \
+ " the same extension is used twice in row." )
+
+#:def_opt( "DEST2", "D|DEST", "CP", \
+ "path", \
+ "Like {--dest}, but create the directory path automatically." )
+
+#:def_opt( "ESC", "E|esc", "CP", \
+ "char", \
+ "Define an alternative escape character for destination files. The" \
+ " default is '%'. For Windows batch files it is a good choice to set" \
+ " @'-E$$'@." )
+
+#:def_opt( "OVERWRITE", "o|overwrite", "C", \
+ "", \
+ "Overwrite already existing files without warning and ignore option" \
+ " {--number}." )
+
+#:def_opt( "NUMBER", "number|num", "C", \
+ "", \
+ "If a file already exist, append a number directly before the file" \
+ " extension to make the filename unique. If other numbered files" \
+ " already exist (ignoring case), use the maximum existing index+1." \
+ " @--num@ is a short cut." )
+
+#:def_opt( "REMOVE_DEST", "r|remove-dest|removedest|rm-dest|rmdest|remove", "C", \
+ "", \
+ "Remove already existing files before creating it. If set," \
+ " {--overwrite} is ignored. @--rm-dest@ is a short cut." )
+
+#:def_opt( "UPDATE", "u|update", "C", \
+ "", \
+ "Update only existing files and don't create new files. If set," \
+ " {--overwrite} and {--remove-dest} are ignored." )
+
+#:def_opt( "PRESERVE", "p|preserve", "C", \
+ "", \
+ "Preserve file times (atime+mtime) while converting or copying files." )
+
+#:def_opt( "IGNORE", "i|ignore", "C", \
+ "", \
+ "Ignore non existing source files without warning." )
+
+#:def_opt( "CLEAN_DOL", "clean-dol|cleandol", "G", \
+ "", \
+ "Remove additional DOL sections, reset entry point and VBI address," \
+ " and try to restore other patches known by SZS tools. This is done" \
+ " after loading a DOL and before analysing and patching to allow" \
+ " re-patching." )
+
+#:def_opt( "ADD_CTCODE", "add-ctcode|addctcode", "C", \
+ "", \
+ "If source is an original main.dol file of MKWii, then append 2" \
+ " sections (usually T2 and D8) with @CT-CODE@. The CTCODE is inserted" \
+ " after sections defined by {--add-section} and then only, if there" \
+ " are no address collisions.\n" \
+ " If {--ct-dir} is used, then files named @rmc[ejp]/boot_code.bin@" \
+ " and @boot_code.bin@ for T2, and @rmc[ejp]/boot_data.bin@ and" \
+ " @boot_data.bin@ for D8 are searched." )
+
+#:def_opt( "CT_DIR", "ct-dir|ctdir", "GP", \
+ "dir", \
+ "Define a search directory for CT-CODE parts and use the internal" \
+ " copies only, if no valid file is found. Each file is searched" \
+ " without and then with extension '.bz2'. For both cases bzip2 files" \
+ " are detected and decompressed. Only files with correct file type are" \
+ " accepted.\n" \
+ " Use this option multiple times to define more than one search" \
+ " directory." )
+
+#:def_opt( "MOVE_D8", "move-d8|moved8", "C", \
+ "", \
+ "Move the @CT-CODE@ section D8 to another place at the middle of" \
+ " binary. It is done automatically, if the original place overlaps" \
+ " other existing sections." )
+
+#:def_opt( "ADD_SECTION", "add-section|addsection", "CP", \
+ "file", \
+ "Each option call adds the filename to an internal list. Each file" \
+ " must be of type GCT, GCH or WCH. All GCT files together are combined" \
+ " with an internal code handler to one section (like a GCH file). GCH" \
+ " and WCH define sections and patches. The defined sections are added" \
+ " and VBI hooks are optionally initialized. Use option {--force} to" \
+ " allow overlapped sections. Use option {--verbose} up to 2 times for" \
+ " a log.\n" \
+ " If a single file is not found and the filename (not path) contains" \
+ " at least 1 '@@' character, then all '@@' characters of it are" \
+ " replaced by the region code (one of P,E,J,K) for a second try.\n" \
+ " The intention of this option is to add a Gecko Code Handler and" \
+ " cheat codes to a main.dol for automatic execution." )
+
+#:def_opt( "GCT_MOVE", "gct-move|gctmove", "CO", \
+ "[=mode]", \
+ "If a section is of type gecko code handler + cheat code, then make" \
+ " the heap smaller and move the cheat codes before the FST section.\n" \
+ " Parameter MODE is optional. If set, OFF disables and ON enables" \
+ " this feature. For mode AUTO (default) this feature is enabled, if" \
+ " the cheat codes are too large or for internal reasons." )
+
+#:def_opt( "GCT_ADDR", "gct-addr|gctaddr", "CP", \
+ "address", \
+ "If {--gct-move} is active, a text section is created to manage the" \
+ " code handling. This section is only needed at start and is placed by" \
+ " default at address 0c802c0000 (good address for all 4 regions) as" \
+ " part of BSS. This option changes the start address of the section." \
+ " If address is @0@ or invalid, then unused BSS space is searched." )
+
+#:def_opt( "GCT_SPACE", "gct-space|gctspace", "CP", \
+ "size", \
+ "Define the minimal space for the code part of {--gct-move}. This" \
+ " value is ignored, if it is smaller than the size of the cheat codes." \
+ " This option was only implemented to test the memory allocation by" \
+ " {--gct-move} with large blocks." )
+
+#:def_opt( "ALLOW_USER_GCH", "allow-user-gch|allowusergch", "CO", \
+ "[=mode]", \
+ " This option is only relevant, if main.dol is patched for wiimmfi.de." \
+ " It is dedicated to custom distribution creators for test purposes." \
+ " If enabled, a user can load an own instance of Gecko Code Handler" \
+ " and cheat codes and can use them online. If disabled, pachcing for" \
+ " online modus is disabled if an alternative Gecko Code Handler is" \
+ " detected.\n" \
+ " Parameter MODE is optional. If set, OFF disables and ON enables" \
+ " this feature. For mode AUTO (default) it depends on other options." )
+
+#:def_opt( "SECTIONS", "sections", "C", \
+ "", \
+ "Print in machine readable sections and parameter lines." )
+
+#:def_opt( "VADDR", "vaddr|va", "CP", \
+ "RANGE", \
+ "Comma separated list of virtual addresses to select the hex-dump" \
+ " ranges. Each element is either @ADDRESS@ (1 byte) or @START:END@ or" \
+ " @START#SIZE@." )
+
+#:def_opt( "FADDR", "faddr|fa", "CP", \
+ "RANGE", \
+ "Comma separated list of file addresses to select the hex-dump ranges." \
+ " Each element is either @ADDRESS@ (1 byte) or @START:END@ or" \
+ " @START#SIZE@." )
+
+#:def_opt( "SNAME", "sname|sn", "CP", \
+ "LIST", \
+ "Comma separated list of section names to select the hex-dump ranges." )
+
+#:def_opt( "INT1", "i1", "C", \
+ "", \
+ "Format: Print single bytes as integer number (default)." )
+
+#:def_opt( "INT2", "i2", "C", \
+ "", \
+ "Format: Print each 2 bytes as integer number." )
+
+#:def_opt( "INT3", "i3", "C", \
+ "", \
+ "Format: Print each 3 bytes as integer number." )
+
+#:def_opt( "INT4", "i4", "C", \
+ "", \
+ "Format: Print each 4 bytes as integer number." )
+
+#:def_opt( "INT5", "i5", "C", \
+ "", \
+ "Format: Print each 5 bytes as integer number." )
+
+#:def_opt( "INT6", "i6", "C", \
+ "", \
+ "Format: Print each 6 bytes as integer number." )
+
+#:def_opt( "INT7", "i7", "C", \
+ "", \
+ "Format: Print each 7 bytes as integer number." )
+
+#:def_opt( "INT8", "i8", "C", \
+ "", \
+ "Format: Print each 8 bytes as integer number." )
+
+#:def_opt( "FLOAT", "float", "C", \
+ "", \
+ "Format: Print each 4 bytes as floating point number." )
+
+#:def_opt( "DOUBLE", "double", "C", \
+ "", \
+ "Format: Print each 8 bytes as double floating point number." )
+
+#:def_opt( "LE", "le", "C", \
+ "", \
+ "Use little endian for binary data." )
+
+#:def_opt( "BE", "be", "C", \
+ "", \
+ "Use big endian for binary data (default)." )
+
+#:def_opt( "ZEROS", "zeros", "C", \
+ "", \
+ "Print integer numbers with leading zeros." )
+
+#:def_opt( "HEX", "hex", "C", \
+ "", \
+ "Print integer numbers as hexadecimal numbers (default)." )
+
+#:def_opt( "DEC", "dec", "C", \
+ "", \
+ "Print integer numbers as decimal numbers." )
+
+#:def_opt( "C_SYNTAX", "c-syntax|csyntax", "C", \
+ "", \
+ "Print output in `C' syntax." )
+
+#:def_opt( "ADDR", "address", "CP", \
+ "addr", \
+ "Use @ADDR@ instead of null as start address for the dump." )
+
+#:def_opt( "ALIGN", "align", "C", \
+ "", \
+ "Try to align the dump, so that the addresses (printed or not) are" \
+ " multiple of bytes-per-line." )
+
+#:def_opt( "TRIGGER", "trigger", "CP", \
+ "num", \
+ "If the number @NUM@ is found and printed, close the current line and" \
+ " start with a new one. If {--align} is set too, continue the next" \
+ " line with the current column. The trigger works only for integer" \
+ " formats, but not for floats." )
+
+#:def_opt( "NO_ADDR", "no-address|noaddress", "C", \
+ "", \
+ "Suppress the address column of the dump." )
+
+#:def_opt( "NO_NUMBERS", "no-numbers|nonumbers", "C", \
+ "", \
+ "Suppress the numbers column of the dump." )
+
+#:def_opt( "NO_TEXT", "no-text|notext", "C", \
+ "", \
+ "Suppress the text column of the dump." )
+
+#:def_opt( "FORMAT", "format", "C", \
+ "", \
+ "Add @'#FORMAT:'@ info lines." )
+
+#:def_opt( "NO_NULL", "no-null|nonull", "C", \
+ "", \
+ "Ignore data lines with NULL bytes only and print a summary for each" \
+ " NULL block. (@'#NULL: ...'@)" )
+
+#:def_opt( "NARROW", "narrow", "C", \
+ "", \
+ "Suppress the spaces that are usually inserted for readability." )
+
+#:def_opt( "SMALL", "small", "C", \
+ "", \
+ "Each call will halve the number of bytes per line. Usually, 16 bytes" \
+ " per lines are reduced to 8, then to 4, 2 and 1. The effective number" \
+ " of bytes per line is format dependent." )
+
+#:def_opt( "WIDE", "wide", "C", \
+ "", \
+ "Each call will round down the current bytes per line value to the" \
+ " next multiple of 16 and then increment it by 16. Usually, 16 bytes" \
+ " per lines are enhanced to 32, then to 48, 64, 80 and so on. The" \
+ " effective number of bytes per line is format dependent." )
+
+#:def_opt( "BYTES", "bytes", "CP", \
+ "num", \
+ "Print up to @NUM@ bytes per line instead of 16. The maximum allowed" \
+ " value is 600. The effective number of bytes per line is format" \
+ " dependent (multiple of format size)." )
+
+#:def_cmd_opt( "VERSION", "BRIEF", \
+ "", \
+ "Print only the version number, revision and system. If set twice," \
+ " print only the version number." )
+
+#:def_cmd_opt( "VERSION", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "VERSION", "LONG", \
+ "", \
+ "Print in long format. Ignored if option {--sections} is set." )
+
+#:def_cmd_opt( "HELP", "WIDTH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "NO_COLORS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "COLORS", "LONG", \
+ "", \
+ "Print also a list of all colored text types. If set twice, include" \
+ " alternative names. If set three times, include raw color names." )
+
+#:def_cmd_opt( "COLORS", "BRIEF", \
+ "", \
+ "Ignore option --long and print a single status line about current" \
+ " color settings." )
+
+#:def_cmd_opt( "ERROR", "SECTIONS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ERROR", "LONG", \
+ "", \
+ "Print message text instead of message name." )
+
+#:def_cmd_opt( "ERROR", "BRIEF", \
+ "", \
+ "Print message number instead of message name." )
+
+#:def_cmd_opt( "FILETYPE", "LONG", \
+ "", \
+ "Print an additional column with the decompressed file type and" \
+ " version. If entered twice, a validation status column is added." )
+
+#:def_cmd_opt( "FILETYPE", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILEATTRIB", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "RAWDUMP", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "RAWDUMP", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "DUMP", "LONG", \
+ "", \
+ "For DOL files: If set, a second table with the image map is printed." \
+ " If set twice, a third table with delta values is printed too." )
+
+#:def_cmd_opt( "HEXDUMP", "VADDR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "FADDR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "SNAME", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "LOGGING", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT1", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT3", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT4", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT5", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT6", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT7", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "INT8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "FLOAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "DOUBLE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "LE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "BE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "ZEROS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "HEX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "DEC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "C_SYNTAX", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "ADDR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "ALIGN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "TRIGGER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "NO_ADDR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "NO_NUMBERS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "NO_TEXT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "FORMAT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "NO_NULL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "NARROW", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "SMALL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "WIDE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HEXDUMP", "BYTES", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "HTTPS", "LONG", \
+ "", \
+ " Print output a C source" )
+
+#:def_cmd_opt( "HTTPS", "VERBOSE", \
+ "", \
+ " Print hex dump if an entry differs." )
+
+#:def_cmd_opt( "EXTRACT", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "EXTRACT", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "LONG", \
+ "", \
+ "Add columns for music slot and short name." )
+
+#:def_cmd_opt( "TRACKS", "DE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "ARENAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "VS_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "BT_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "ALL_RANKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "HTTPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "DOMAIN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "WIIMMFI", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "PB_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "WC24", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "VS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "BT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "CANNON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "TRACKS", "MENO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "NO_HEADER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "BRIEF", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "LONG", \
+ "", \
+ "Add columns for music slot and short name." )
+
+#:def_cmd_opt( "ARENAS", "DE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "ARENAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "VS_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "BT_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "ALL_RANKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "HTTPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "DOMAIN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "WIIMMFI", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "PB_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "WC24", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "VS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "BT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "CANNON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ARENAS", "MENO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "ARENAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "VS_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "BT_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "ALL_RANKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "HTTPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "DOMAIN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "WIIMMFI", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "PB_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "WC24", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "VS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "BT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "CANNON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FILES", "MENO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "ARENAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "VS_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "BT_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "ALL_RANKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "HTTPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "DOMAIN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "WIIMMFI", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "PB_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "WC24", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "VS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "BT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "CANNON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "MENO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "FIND", "LONG", \
+ "", \
+ "Add a user friendly track or arena name at the end of each line. If" \
+ " set twice, add also the file names of the track and sound files" \
+ " before the track name. If set three times, add the slot index and" \
+ " the internal index (both zero based) before the file names." )
+
+#:def_cmd_opt( "FIND", "DE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "POINTS", "POINTS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "POINTS", "BRIEF", \
+ "", \
+ "Print the table as comma separated lists in C notation." )
+
+#:def_cmd_opt( "POINTS", "LONG", \
+ "", \
+ "Append a string in {--points} format that defines the table. If set" \
+ " twice, append up to 3 strings in different modes." )
+
+#:def_cmd_opt( "ANALYZE", "CLEAN_DOL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ARENAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "VS_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "BT_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "ALL_RANKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "HTTPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "DOMAIN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "WIIMMFI", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "PB_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "WC24", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "VS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "BT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "CANNON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "MENO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "ANALYZE", "LONG", \
+ "", \
+ "Print different lists if bugs found. If set twice, print the lists" \
+ " always." )
+
+#:def_cmd_opt( "PATCH", "DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DEST2", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ESC", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "OVERWRITE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "NUMBER", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REMOVE_DEST", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "UPDATE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PRESERVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "IGNORE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "CLEAN_DOL", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "TRACKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ARENAS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "VS_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BT_REGION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALL_RANKS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "HTTPS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "DOMAIN", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "WIIMMFI", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "PB_MODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "WC24", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "VS", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "BT", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "CANNON", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MENO", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ADD_CTCODE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "CT_DIR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "MOVE_D8", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ADD_SECTION", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "GCT_MOVE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "GCT_ADDR", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "GCT_SPACE", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "ALLOW_USER_GCH", \
+ "", \
+ "" )
+
+#:def_cmd_opt( "PATCH", "FORCE", \
+ "", \
+ "Accept overlapped sections.\n" \
+ ">>> THE RESULT IS MOST LIKELY INVALID! <<<" )
+
+
+##
+###############################################################################
+############### END ###############
+###############################################################################
+
diff --git a/project/src/ui/ui.h b/project/src/ui/ui.h
new file mode 100644
index 0000000..8f43684
--- /dev/null
+++ b/project/src/ui/ui.h
@@ -0,0 +1,50 @@
+
+/***************************************************************************
+ * _______ _______ _______ *
+ * | ___ |____ | ___ | *
+ * | | |_| / /| | |_| *
+ * | |_____ / / | |_____ *
+ * |_____ | / / |_____ | *
+ * _ | | / / _ | | *
+ * | |___| |/ /____| |___| | *
+ * |_______|_______|_______| *
+ * *
+ * Wiimms SZS Tools *
+ * https://szs.wiimm.de/ *
+ * *
+ ***************************************************************************
+ * *
+ * This file is part of the SZS project. *
+ * Visit https://szs.wiimm.de/ for project details and sources. *
+ * *
+ * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+#ifndef SZS_UI_H
+#define SZS_UI_H
+
+#define OPT_OLD_NEW 1 // 0 | 1 -> enable options --OLD --NEW
+#include "dclib-ui.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// END ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // SZS_UI_H
+