From b8aca433e32346c9293acc34a9e2242809ac5692 Mon Sep 17 00:00:00 2001 From: Wiimm Date: Fri, 23 Feb 2024 16:02:06 +0100 Subject: SZS v2.41b --- project/src/analyze.c | 3 +- project/src/file-type.c | 131 ++++++++------ project/src/file-type.h | 106 +++++------ project/src/lib-ctcode.c | 13 +- project/src/lib-ctcode.h | 9 +- project/src/lib-file.c | 13 +- project/src/lib-image.h | 111 ++++++++++-- project/src/lib-image1.c | 103 ++++++++++- project/src/lib-image2.c | 260 +++++++++++++++++++++------ project/src/lib-image3.c | 6 +- project/src/lib-kmp.c | 2 + project/src/lib-lecode.c | 10 +- project/src/lib-ledis.c | 14 +- project/src/lib-lzma.c | 2 +- project/src/lib-std.h | 4 + project/src/lib-szs-create.c | 28 ++- project/src/lib-szs.c | 1 - project/src/lib-xbmg.c | 8 +- project/src/ui/tab-wbmgt.inc | 3 + project/src/ui/tab-wctct.inc | 3 + project/src/ui/tab-wimgt.inc | 3 + project/src/ui/tab-wkclt.inc | 3 + project/src/ui/tab-wkmpt.inc | 3 + project/src/ui/tab-wlect.inc | 3 + project/src/ui/tab-wmdlt.inc | 3 + project/src/ui/tab-wpatt.inc | 3 + project/src/ui/tab-wstrt.inc | 3 + project/src/ui/tab-wszst.inc | 4 + project/src/ui/ui-wbmgt.c | 93 +++++----- project/src/ui/ui-wbmgt.h | 4 +- project/src/ui/ui-wctct.c | 131 +++++++------- project/src/ui/ui-wctct.h | 4 +- project/src/ui/ui-wimgt.c | 79 +++++---- project/src/ui/ui-wimgt.h | 4 +- project/src/ui/ui-wkclt.c | 121 +++++++------ project/src/ui/ui-wkclt.h | 4 +- project/src/ui/ui-wkmpt.c | 151 ++++++++-------- project/src/ui/ui-wkmpt.h | 4 +- project/src/ui/ui-wlect.c | 141 ++++++++------- project/src/ui/ui-wlect.h | 4 +- project/src/ui/ui-wmdlt.c | 99 ++++++----- project/src/ui/ui-wmdlt.h | 4 +- project/src/ui/ui-wpatt.c | 67 +++---- project/src/ui/ui-wpatt.h | 4 +- project/src/ui/ui-wstrt.c | 205 +++++++++++----------- project/src/ui/ui-wstrt.h | 4 +- project/src/ui/ui-wszst.c | 408 ++++++++++++++++++++++--------------------- project/src/ui/ui-wszst.h | 4 +- project/src/wbmgt.c | 1 + project/src/wctct.c | 1 + project/src/wimgt.c | 30 +++- project/src/wkclt.c | 1 + project/src/wkmpt.c | 1 + project/src/wlect.c | 1 + project/src/wmdlt.c | 1 + project/src/wpatt.c | 1 + project/src/wstrt.c | 1 + project/src/wszst.c | 5 +- project/src/wtest.c | 1 - 59 files changed, 1494 insertions(+), 940 deletions(-) (limited to 'project/src') diff --git a/project/src/analyze.c b/project/src/analyze.c index 525f277..09d08b0 100644 --- a/project/src/analyze.c +++ b/project/src/analyze.c @@ -1139,7 +1139,8 @@ void AnalyzeTPL ( szs_file_t * szs, u8 * data, uint data_size, ccp name ) { // [[analyse-magic]] file_format_t fform = GetByMagicFF(data,data_size,data_size); - if ( fform != FF_TPL +// [[tpl-ex+]] + if ( !IsTplFF(fform) || opt_analyze_mode != ANA_MD_DEFAULT && !(opt_analyze_mode&ANA_MD_TPL) ) { diff --git a/project/src/file-type.c b/project/src/file-type.c index f3d3171..97ba5a8 100644 --- a/project/src/file-type.c +++ b/project/src/file-type.c @@ -678,7 +678,31 @@ const file_type_t FileTypeTab[FF_N+1] = "Image container" }, - // FF_BTI = 55 + // FF_TPLX = 55 + { + FF_TPLX, 0, 0, "TPLx", + ".tpl", ".szs", ".tpl", + FFT_VALID | FFT_GRAPHIC | FFT_CUT | FFT_DECODE | FFT_ENCODE, + 4, {0x00,0x20,0xaf,0x30}, // "\000 ¯0" + 0, + MinusString, + MinusString, + "Image container with extended file header" + }, + + // FF_CUPICON = 56 + { + FF_CUPICON, 0, 0, "TPLx", + ".tpl", ".szs", ".tpl", + FFT_VALID | FFT_GRAPHIC | FFT_ENCODE, + 0, {0}, // no magic + 0, + MinusString, + MinusString, + "Alias for TPLx.CMPR" + }, + + // FF_BTI = 57 { FF_BTI, 0, 0, "BTI", ".bti", ".szs", ".bti", @@ -690,7 +714,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Image container" }, - // FF_BREFT_IMG = 56 + // FF_BREFT_IMG = 58 { FF_BREFT_IMG, 0, 0, "BT-IMG", ".bt-img", ".szs", ".bt-img", @@ -702,7 +726,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Raw image of BREFT file" }, - // FF_BMG = 57 + // FF_BMG = 59 { FF_BMG, FF_BMG, FF_BMG_TXT, "BMG", ".bmg", ".szs", ".bmg", @@ -714,7 +738,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Message file" }, - // FF_BMG_TXT = 58 + // FF_BMG_TXT = 60 { FF_BMG_TXT, FF_BMG, FF_BMG_TXT, "BMGTXT", ".txt", ".szs", ".txt", @@ -726,7 +750,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Text version of BMG" }, - // FF_KCL = 59 + // FF_KCL = 61 { FF_KCL, FF_KCL, FF_KCL_TXT, "KCL", ".kcl", ".szs", ".kcl", @@ -738,7 +762,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Collision file" }, - // FF_KCL_TXT = 60 + // FF_KCL_TXT = 62 { FF_KCL_TXT, FF_KCL, FF_KCL_TXT, "KCLTXT", ".obj", ".szs", ".obj", @@ -750,7 +774,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Wavefront OBJ by WSZST" }, - // FF_WAV_OBJ = 61 + // FF_WAV_OBJ = 63 { FF_WAV_OBJ, FF_KCL, FF_WAV_OBJ, "WAVOBJ", ".obj", ".szs", ".obj", @@ -762,7 +786,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Wavefront OBJ" }, - // FF_SKP_OBJ = 62 + // FF_SKP_OBJ = 64 { FF_SKP_OBJ, FF_KCL, FF_SKP_OBJ, "SKPOBJ", ".obj", ".szs", ".obj", @@ -774,7 +798,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Wavefront OBJ by Sketchup" }, - // FF_KMP = 63 + // FF_KMP = 65 { FF_KMP, FF_KMP, FF_KMP_TXT, "KMP", ".kmp", ".szs", ".kmp", @@ -786,7 +810,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Track information file" }, - // FF_KMP_TXT = 64 + // FF_KMP_TXT = 66 { FF_KMP_TXT, FF_KMP, FF_KMP_TXT, "KMPTXT", ".txt", ".szs", ".txt", @@ -798,7 +822,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Text version of KMP" }, - // FF_ITEMSLT = 65 + // FF_ITEMSLT = 67 { FF_ITEMSLT, FF_ITEMSLT, FF_ITEMSLT_TXT, "ITEMSLT", ".bin", ".szs", ".slt", @@ -810,7 +834,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_ITEMSLT_TXT = 66 + // FF_ITEMSLT_TXT = 68 { FF_ITEMSLT_TXT, FF_ITEMSLT, FF_ITEMSLT_TXT, "ITEMSLTTXT", ".txt", ".szs", ".txt", @@ -822,7 +846,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_KMG = 67 + // FF_KMG = 69 { FF_KMG, FF_KMG, FF_KMG_TXT, "KMG", ".kmg", ".szs", ".kmg", @@ -834,7 +858,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_KMG_TXT = 68 + // FF_KMG_TXT = 70 { FF_KMG_TXT, FF_KMG, FF_KMG_TXT, "KMGTXT", ".txt", ".szs", ".txt", @@ -846,7 +870,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_KRM = 69 + // FF_KRM = 71 { FF_KRM, FF_KRM, FF_KRM_TXT, "KRM", ".krm", ".szs", ".krm", @@ -858,7 +882,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_KRM_TXT = 70 + // FF_KRM_TXT = 72 { FF_KRM_TXT, FF_KRM, FF_KRM_TXT, "KRMTXT", ".txt", ".szs", ".txt", @@ -870,7 +894,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_KRT = 71 + // FF_KRT = 73 { FF_KRT, FF_KRT, FF_KRT_TXT, "KRT", ".krt", ".szs", ".krt", @@ -882,7 +906,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_KRT_TXT = 72 + // FF_KRT_TXT = 74 { FF_KRT_TXT, FF_KRT, FF_KRT_TXT, "KRTTXT", ".txt", ".szs", ".txt", @@ -894,7 +918,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_OBJFLOW = 73 + // FF_OBJFLOW = 75 { FF_OBJFLOW, FF_OBJFLOW, FF_OBJFLOW_TXT, "OBFLOW", ".bin", ".szs", ".bin", @@ -906,7 +930,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_OBJFLOW_TXT = 74 + // FF_OBJFLOW_TXT = 76 { FF_OBJFLOW_TXT, FF_OBJFLOW, FF_OBJFLOW_TXT, "OF-TXT", ".txt", ".szs", ".txt", @@ -918,7 +942,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_ITEM = 75 + // FF_GH_ITEM = 77 { FF_GH_ITEM, FF_GH_ITEM, FF_GH_ITEM_TXT, "GHITEM", ".bin", ".szs", ".bin", @@ -930,7 +954,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_ITEM_TXT = 76 + // FF_GH_ITEM_TXT = 78 { FF_GH_ITEM_TXT, FF_GH_ITEM, FF_GH_ITEM_TXT, "GI-TXT", ".txt", ".szs", ".txt", @@ -942,7 +966,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_IOBJ = 77 + // FF_GH_IOBJ = 79 { FF_GH_IOBJ, FF_GH_IOBJ, FF_GH_IOBJ_TXT, "GHIOBJ", ".bin", ".szs", ".bin", @@ -954,7 +978,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_IOBJ_TXT = 78 + // FF_GH_IOBJ_TXT = 80 { FF_GH_IOBJ_TXT, FF_GH_IOBJ, FF_GH_IOBJ_TXT, "GIOTXT", ".txt", ".szs", ".txt", @@ -966,7 +990,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_KART = 79 + // FF_GH_KART = 81 { FF_GH_KART, FF_GH_KART, FF_GH_KART_TXT, "GHKART", ".bin", ".szs", ".bin", @@ -978,7 +1002,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_KART_TXT = 80 + // FF_GH_KART_TXT = 82 { FF_GH_KART_TXT, FF_GH_KART, FF_GH_KART_TXT, "GK-TXT", ".txt", ".szs", ".txt", @@ -990,7 +1014,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_KOBJ = 81 + // FF_GH_KOBJ = 83 { FF_GH_KOBJ, FF_GH_KOBJ, FF_GH_KOBJ_TXT, "GHKOBJ", ".bin", ".szs", ".bin", @@ -1002,7 +1026,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_GH_KOBJ_TXT = 82 + // FF_GH_KOBJ_TXT = 84 { FF_GH_KOBJ_TXT, FF_GH_KOBJ, FF_GH_KOBJ_TXT, "GKOTXT", ".txt", ".szs", ".txt", @@ -1014,7 +1038,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_DRIVER = 83 + // FF_DRIVER = 85 { FF_DRIVER, 0, 0, "DRV", ".bin", ".szs", ".bin", @@ -1026,7 +1050,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_VEHICLE = 84 + // FF_VEHICLE = 86 { FF_VEHICLE, 0, 0, "VEH", ".bin", ".szs", ".bin", @@ -1038,7 +1062,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_BRASD = 85 + // FF_BRASD = 87 { FF_BRASD, 0, 0, "BRASD", ".brasd", ".szs", ".brasd", @@ -1050,7 +1074,7 @@ const file_type_t FileTypeTab[FF_N+1] = filetype_info_unknown }, - // FF_RKG = 86 + // FF_RKG = 88 { FF_RKG, 0, 0, "RKG", ".rkg", ".szs", ".rkg", @@ -1062,7 +1086,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_RKCO = 87 + // FF_RKCO = 89 { FF_RKCO, 0, 0, "RKCO", ".rkco", ".szs", ".rkco", @@ -1074,7 +1098,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_STATICR = 88 + // FF_STATICR = 90 { FF_STATICR, 0, 0, "STATICR", ".rel", ".szs", ".rel", @@ -1086,7 +1110,7 @@ const file_type_t FileTypeTab[FF_N+1] = "A 'StaticR.rel' file" }, - // FF_DOL = 89 + // FF_DOL = 91 { FF_DOL, 0, 0, "DOL", ".dol", ".szs", ".dol", @@ -1098,7 +1122,7 @@ const file_type_t FileTypeTab[FF_N+1] = "An executable DOL file" }, - // FF_GCT = 90 + // FF_GCT = 92 { FF_GCT, 0, 0, "GCT", ".gct", ".szs", ".gct", @@ -1110,7 +1134,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Gecko Cheat Code, binary" }, - // FF_GCT_TXT = 91 + // FF_GCT_TXT = 93 { FF_GCT_TXT, 0, 0, "GCT-TXT", ".gct", ".szs", ".gct", @@ -1122,7 +1146,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Gecko Cheat Code, text" }, - // FF_GCH = 92 + // FF_GCH = 94 { FF_GCH, 0, 0, "GCH", ".gch", ".szs", ".gch", @@ -1134,7 +1158,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Gecko Cheat Handler + coded" }, - // FF_WCH = 93 + // FF_WCH = 95 { FF_WCH, 0, 0, "WCH", ".wch", ".szs", ".wch", @@ -1146,7 +1170,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Wiimms Cheat Handler + codes" }, - // FF_WPF = 94 + // FF_WPF = 96 { FF_WPF, 0, 0, "WPF", ".wpf", ".szs", ".wpf", @@ -1158,7 +1182,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Wiimms Patch File" }, - // FF_XPF = 95 + // FF_XPF = 97 { FF_XPF, 0, 0, "XPF", ".xpf", ".szs", ".xpf", @@ -1170,7 +1194,7 @@ const file_type_t FileTypeTab[FF_N+1] = "Extended Patch File" }, - // FF_DISTRIB = 96 + // FF_DISTRIB = 98 { FF_DISTRIB, 0, 0, "DISTRIB", ".txt", ".szs", ".txt", @@ -1182,7 +1206,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_PNG = 97 + // FF_PNG = 99 { FF_PNG, 0, 0, "PNG", ".png", ".png", ".png", @@ -1194,7 +1218,7 @@ const file_type_t FileTypeTab[FF_N+1] = "A public image format" }, - // FF_PORTDB = 98 + // FF_PORTDB = 100 { FF_PORTDB, 0, 0, "PORTDB", ".bin", ".szs", ".bin", @@ -1206,7 +1230,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_TXT = 99 + // FF_TXT = 101 { FF_TXT, 0, 0, "TXT", ".txt", ".szs", ".txt", @@ -1218,7 +1242,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_SCRIPT = 100 + // FF_SCRIPT = 102 { FF_SCRIPT, 0, 0, "SCRIPT", ".script", ".szs", ".script", @@ -1230,7 +1254,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_JSON = 101 + // FF_JSON = 103 { FF_JSON, 0, 0, "JSON", ".json", ".szs", ".json", @@ -1242,7 +1266,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_SH = 102 + // FF_SH = 104 { FF_SH, 0, 0, "SH", ".sh", ".szs", ".sh", @@ -1254,7 +1278,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_BASH = 103 + // FF_BASH = 105 { FF_BASH, 0, 0, "BASH", ".sh", ".szs", ".sh", @@ -1266,7 +1290,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_PHP = 104 + // FF_PHP = 106 { FF_PHP, 0, 0, "PHP", ".php", ".szs", ".php", @@ -1278,7 +1302,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_MAKEDOC = 105 + // FF_MAKEDOC = 107 { FF_MAKEDOC, 0, 0, "MAKEDOC", ".md", ".szs", ".md", @@ -1290,7 +1314,7 @@ const file_type_t FileTypeTab[FF_N+1] = EmptyString }, - // FF_DIRECTORY = 106 + // FF_DIRECTORY = 108 { FF_DIRECTORY, 0, 0, "DIR", ".d", ".d", ".d", @@ -1376,6 +1400,9 @@ const KeywordTab_t cmdtab_FileType[] = { FF_MDL_TXT, "MDL-TXT", "MDLTXT", 0x11 }, { FF_PAT_TXT, "PAT-TXT", "PATTXT", 0x7011 }, { FF_TPL, "TPL", 0, 0x3809 }, + { FF_TPLX, "TPL", "TPLX", 0x3809 }, + { FF_CUPICON, "CUPICON", "TPL", 0x2009 }, + { FF_CUPICON, "TPLX", 0, 0x2009 }, { FF_BTI, "BTI", "BTIENV", 0x3809 }, { FF_BTI, "BTIMAT", 0, 0x3809 }, { FF_BREFT_IMG, "BREFT-IMG", "BREFTIMG", 0x3809 }, diff --git a/project/src/file-type.h b/project/src/file-type.h index deb6f76..15c237c 100644 --- a/project/src/file-type.h +++ b/project/src/file-type.h @@ -125,77 +125,79 @@ typedef enum file_format_t FF_PAT_TXT, // 53 FF_TPL, // 54 - FF_BTI, // 55 - FF_BREFT_IMG, // 56 + FF_TPLX, // 55 + FF_CUPICON, // 56 + FF_BTI, // 57 + FF_BREFT_IMG, // 58 - FF_BMG, // 57 - FF_BMG_TXT, // 58 + FF_BMG, // 59 + FF_BMG_TXT, // 60 - FF_KCL, // 59 - FF_KCL_TXT, // 60 - FF_WAV_OBJ, // 61 - FF_SKP_OBJ, // 62 + FF_KCL, // 61 + FF_KCL_TXT, // 62 + FF_WAV_OBJ, // 63 + FF_SKP_OBJ, // 64 - FF_KMP, // 63 - FF_KMP_TXT, // 64 + FF_KMP, // 65 + FF_KMP_TXT, // 66 - FF_ITEMSLT, // 65 - FF_ITEMSLT_TXT, // 66 + FF_ITEMSLT, // 67 + FF_ITEMSLT_TXT, // 68 - FF_KMG, // 67 - FF_KMG_TXT, // 68 + FF_KMG, // 69 + FF_KMG_TXT, // 70 - FF_KRM, // 69 - FF_KRM_TXT, // 70 + FF_KRM, // 71 + FF_KRM_TXT, // 72 - FF_KRT, // 71 - FF_KRT_TXT, // 72 + FF_KRT, // 73 + FF_KRT_TXT, // 74 - FF_OBJFLOW, // 73 - FF_OBJFLOW_TXT, // 74 + FF_OBJFLOW, // 75 + FF_OBJFLOW_TXT, // 76 - FF_GH_ITEM, // 75 - FF_GH_ITEM_TXT, // 76 + FF_GH_ITEM, // 77 + FF_GH_ITEM_TXT, // 78 - FF_GH_IOBJ, // 77 - FF_GH_IOBJ_TXT, // 78 + FF_GH_IOBJ, // 79 + FF_GH_IOBJ_TXT, // 80 - FF_GH_KART, // 79 - FF_GH_KART_TXT, // 80 + FF_GH_KART, // 81 + FF_GH_KART_TXT, // 82 - FF_GH_KOBJ, // 81 - FF_GH_KOBJ_TXT, // 82 + FF_GH_KOBJ, // 83 + FF_GH_KOBJ_TXT, // 84 - FF_DRIVER, // 83 - FF_VEHICLE, // 84 + FF_DRIVER, // 85 + FF_VEHICLE, // 86 - FF_BRASD, // 85 - FF_RKG, // 86 - FF_RKCO, // 87 + FF_BRASD, // 87 + FF_RKG, // 88 + FF_RKCO, // 89 - FF_STATICR, // 88 - FF_DOL, // 89 + FF_STATICR, // 90 + FF_DOL, // 91 - FF_GCT, // 90 - FF_GCT_TXT, // 91 - FF_GCH, // 92 - FF_WCH, // 93 - FF_WPF, // 94 - FF_XPF, // 95 - FF_DISTRIB, // 96 + FF_GCT, // 92 + FF_GCT_TXT, // 93 + FF_GCH, // 94 + FF_WCH, // 95 + FF_WPF, // 96 + FF_XPF, // 97 + FF_DISTRIB, // 98 - FF_PNG, // 97 - FF_PORTDB, // 98 + FF_PNG, // 99 + FF_PORTDB, // 100 - FF_TXT, // 99 - FF_SCRIPT, // 100 - FF_JSON, // 101 - FF_SH, // 102 - FF_BASH, // 103 - FF_PHP, // 104 - FF_MAKEDOC, // 105 + FF_TXT, // 101 + FF_SCRIPT, // 102 + FF_JSON, // 103 + FF_SH, // 104 + FF_BASH, // 105 + FF_PHP, // 106 + FF_MAKEDOC, // 107 - FF_DIRECTORY, // 106 + FF_DIRECTORY, // 108 //--- number of elements diff --git a/project/src/lib-ctcode.c b/project/src/lib-ctcode.c index 5d92737..93c735b 100644 --- a/project/src/lib-ctcode.c +++ b/project/src/lib-ctcode.c @@ -774,7 +774,6 @@ void ResetDataCTCODE ( ctcode_t * ctcode, bool create_empty ) } else if (!ctcode->used_slot[tidx]) { -// [[%04x-]] snprintf(namebuf,sizeof(namebuf),"Slot %u = 0x%03x",tidx,tidx); SetName16(td->tname,namebuf); snprintf(namebuf,sizeof(namebuf),"slot_%02x",tidx); @@ -1056,10 +1055,9 @@ enumError ReorderTracksCTCODE ( ctcode_t * ctcode ) enumError err = LoadXBMG(&bmg,true,opt_order_by,true,false); if (!err) { - track_info_t info[CODE_MAX_TRACKS]; - memset(info,0,sizeof(info)); - + track_info_t *info = CALLOC(CODE_MAX_TRACKS,1); track_info_t *ptr = info; + uint cidx; for ( cidx = opt_order_all ? 0 : 8; cidx < ctcode->n_racing_cups; cidx++ ) @@ -1069,7 +1067,7 @@ enumError ReorderTracksCTCODE ( ctcode_t * ctcode ) uint ti; for ( ti = 0; ti < 4; ti++, ptr++ ) { - DASSERT( ptr < info + ctcode->max_tracks ); + DASSERT( ptr < info + CODE_MAX_TRACKS ); const uint tidx = be32(cd->track_id+ti); const bmg_item_t *bi = FindItemBMG(&bmg,tidx+ctcode->ctb.track_name1.beg); @@ -1106,6 +1104,8 @@ enumError ReorderTracksCTCODE ( ctcode_t * ctcode ) write_be32(cd->track_id+ti,src->tidx); } } + + FREE(info); } ResetBMG(&bmg); @@ -2022,7 +2022,6 @@ static enumError ScanRTL_Track const int tidx = td - ctcode->crs->data; if (ctcode->replace_at) { -// [[%04x+]] snprintf(buf,sizeof(buf),lecode_04x ? "%04X" : "%03X",tidx); PRINT(">>> REPLACE: %s\n",track_string); @@ -2052,7 +2051,6 @@ static enumError ScanRTL_Track if (!*fname) { if (ctcode->use_lecode) -// [[%04x+]] snprintf(fname,sizeof(fname),lecode_04x?"%04x":"%03x",tidx); else snprintf(fname,sizeof(fname),"slot_%02x",tidx); @@ -2995,7 +2993,6 @@ enumError ScanLEBinCTCODE td->music_id = htonl(*music); td->property_id = htonl(*prop); *ct_flags = *flags; -// [[%04x+]] snprintf(td->filename,sizeof(td->filename),lecode_04x?"%04x":"%03x",tidx); } } diff --git a/project/src/lib-ctcode.h b/project/src/lib-ctcode.h index 0f6b230..5e3cdd9 100644 --- a/project/src/lib-ctcode.h +++ b/project/src/lib-ctcode.h @@ -82,15 +82,14 @@ #define CT_CODE_MAX_CUPREF 0x10 // track usage cross-ref, must be <= 0x100 #define LE_CODE_MAX_TRACKS BMG_N_LE_TRACK // max supported tracks -#define LE_CODE_MAX_CUPS BMG_N_LE_RCUP // max supported cups, must be <= 0x100 +#define LE_CODE_MAX_CUPS BMG_N_LE_RCUP // max supported cups, must be >= 0x100 #define LE_FIRST_CT_SLOT MKW_LE_SLOT_BEG // LE: first used custom slot #define LE_LAST_CT_SLOT (MKW_LE_SLOT_END-1) // LE: last used custom slot #define LE_FIRST_RANDOM_SLOT MKW_LE_RANDOM_BEG // LE: first used random slot #define LE_LAST_RANDOM_SLOT (MKW_LE_RANDOM_END-1) // LE: last used random slot -// 3 [[obsolete]] definitions -#define LE_FIRST_LOWER_CT_SLOT 0x44 // LE: first used custom slot +// 2 [[obsolete]] definitions #define LE_FIRST_UPPER_CT_SLOT 0x120 // LE: first used upper custom slot #define LE_LAST_UPPER_CT_SLOT 0x13d // LE: first used upper custom slot @@ -293,8 +292,8 @@ typedef struct ctcode_t bmg_t track_ident; // identifiers of any length (e.g. checksums) // property, music and le_flags - le_property_t property[CODE_MAX_TRACKS]; // not in use yet!! - le_music_t music[CODE_MAX_TRACKS]; // not in use yet!! + le_property_t property[CODE_MAX_TRACKS]; + le_music_t music[CODE_MAX_TRACKS]; le_flags8_t le_flags[CODE_MAX_TRACKS]; u8 hidden[CODE_MAX_TRACKS]; diff --git a/project/src/lib-file.c b/project/src/lib-file.c index 18d26c1..68730c9 100644 --- a/project/src/lib-file.c +++ b/project/src/lib-file.c @@ -951,7 +951,7 @@ file_format_t GetByMagicFF case BRRES_MAGIC_NUM: return FF_BRRES; - case TPL_MAGIC_NUM: return FF_TPL; + //case TPL_MAGIC_NUM: return FF_TPL; case KMP_MAGIC_NUM: return FF_KMP; case BRASD_MAGIC_NUM: return FF_BRASD; @@ -971,6 +971,9 @@ file_format_t GetByMagicFF case CT_MOD2_MAGIC_NUM: return FF_MOD2; case CT_OVR1_MAGIC_NUM: return FF_OVR1; + case TPL_MAGIC_NUM: + return IsTplHeaderEx(data,data_size) ? FF_TPLX : FF_TPL; + case BREFF_MAGIC_NUM: if ( file_size >= 0x20 ) return data_size < 0x14 || !memcmp(data+0x10,BREFF_MAGIC,4) @@ -4327,7 +4330,7 @@ const mkw_prefix_t * GetPrefix ( ccp name, int name_len ) if ( name_len < 0 ) name_len = strlen(name); - + ccp p1 = memchr(name,' ',name_len); if (!p1) return 0; @@ -4339,7 +4342,7 @@ const mkw_prefix_t * GetPrefix ( ccp name, int name_len ) if (res) return res; } - + return FindPrefix(name,p1-name); } @@ -4797,7 +4800,7 @@ void ScanSha1Ref ( struct ScanText_t *st ) good_size = str2ul(srcline.ptr+11,0,10); continue; } - + mem_t src[IDX__N+2]; const uint n = SplitByCharMem(src,IDX__N+1,srcline,'|'); if ( n <= IDX__N ) @@ -5349,7 +5352,7 @@ void AnalyseSPF if (spf->boost.len) spf->game_order++; } - + //--- finally we have the pure name diff --git a/project/src/lib-image.h b/project/src/lib-image.h index a5d7faa..d171af2 100644 --- a/project/src/lib-image.h +++ b/project/src/lib-image.h @@ -85,6 +85,7 @@ typedef struct MipmapOptions_t { bool valid; // TRUE: setup of this record done bool force; // TRUE: force 'n_mipmap' + bool is_tpl; // destination is TPL uint n_mipmap; // number of mipmaps uint n_image; // := n_mipmap+1 uint min_size; // minimal mipmap width and height @@ -92,10 +93,10 @@ typedef struct MipmapOptions_t MipmapOptions_t; // both functions return 'dest', 'src' may be NULL -void SetupMipmapOptions ( MipmapOptions_t *mmo ); -void SetupMipmapOptions1 ( MipmapOptions_t *mmo ); -void CopyMipmapOptions ( MipmapOptions_t *dest, const MipmapOptions_t *src ); -void MipmapOptionsByImage ( MipmapOptions_t *mmo, const struct Image_t *img ); +void SetupMipmapOptions ( MipmapOptions_t *mmo ); +void SetupMipmapOptionsTPL ( MipmapOptions_t *mmo ); +void CopyMipmapOptions ( MipmapOptions_t *dest, const MipmapOptions_t *src ); +void MipmapOptionsByImage ( MipmapOptions_t *mmo, const struct Image_t *img ); ccp InfoMipmapOptions ( const MipmapOptions_t *mmo ); ccp TextMipmapOptions ( const MipmapOptions_t *mmo ); @@ -105,6 +106,11 @@ void PrintMipmapOptions ( FILE *f, int indent, const MipmapOptions_t *mmo ); /////////////////////////////////////////////////////////////////////////////// /////////////// ImageGeometry_t /////////////// /////////////////////////////////////////////////////////////////////////////// + +#define MAX_IMAGE_WIDTH 0xffff +#define MAX_IMAGE_HEIGHT 0xffff + +//----------------------------------------------------------------------------- // [[ImageGeometry_t]] typedef struct ImageGeometry_t @@ -134,6 +140,8 @@ ImageGeometry_t; const ImageGeometry_t * GetImageGeometry ( image_format_t iform ); int PaletteToImageFormat ( int pform, int return_if_invalid ); +//----------------------------------------------------------------------------- + uint CalcImageSize ( uint width, // width of image in pixel @@ -149,6 +157,8 @@ uint CalcImageSize uint * v_blocks // not NULL: store number of vertical blocks ); +//----------------------------------------------------------------------------- + const ImageGeometry_t * CalcImageGeometry ( image_format_t iform, // image format @@ -172,7 +182,7 @@ typedef struct Image_t { //--- image data - image_format_t iform; // current data format + image_format_t iform; // current image format u8 * data; // pointer to data or NULL if iform==IMG_INVALID uint data_size; // size of data in bytes bool data_alloced; // true: 'data' is alloced -> free() it @@ -219,6 +229,7 @@ typedef struct Image_t ccp path; // NULL or alloced filename of image bool path_alloced; // true: 'path' is alloced -> free() it bool is_cup_icon; // true: image contains cup icons + bool test_mode; // true: enable test mode for cup icons (TPL only) file_format_t info_fform; // info about original file format image_format_t info_iform; // info about original image format palette_format_t info_pform; // info about original palette format @@ -295,11 +306,27 @@ void CopyIMG /////////////////////////////////////////////////////////////////////////////// +void ExtractIMG +( + // mipmaps are deleted + + Image_t * dest, // destination image + bool init_dest, // true: initialize 'dest' first + const Image_t * src, // valid source image + + int xbeg, // x-index of first used pixel, robust + int xend, // x-index of first not used pixel, robust + int ybeg, // y-index of first used pixel, robust + int yend // y-index of first not used pixel, robust +); + +/////////////////////////////////////////////////////////////////////////////// + void MoveIMG ( Image_t * dest, // destination image bool init_dest, // true: initialize 'dest' first - Image_t * src // NULL or source image, isresetted + Image_t * src // NULL or source image, is initialized ); /////////////////////////////////////////////////////////////////////////////// @@ -397,7 +424,18 @@ void ResetRawTPL ( tpl_raw_t *raw ); enumError CreateRawTPL ( tpl_raw_t * raw, // results with alloced data - Image_t * src_img // pointer to valid source img + Image_t * src_img, // pointer to valid source img + file_format_t fform // FF_TPL or FF_TPLX +); + +//----------------------------------------------------------------------------- + +enumError SaveRawTPL +( + tpl_raw_t *raw, // raw data created by CreateRawTPL() + FILE *f, // output file, if NULL then use fname+overwrite + ccp fname, // filename of source + bool overwrite // true: allow overwriting ); //----------------------------------------------------------------------------- @@ -405,6 +443,7 @@ enumError CreateRawTPL enumError SaveTPL ( Image_t *src_img, // pointer to valid source img + file_format_t fform, // FF_TPL or FF_TPLX FILE *f, // output file, if NULL then use fname+overwrite ccp fname, // filename of source bool overwrite // true: allow overwriting @@ -612,7 +651,8 @@ typedef struct GenericImgParam_t //--- analysis, setup by CreateGenericIMG() const KeywordTab_t *cmd; // selected command - int force_width; // !=128: finally resize image size to width given + int force_width; // !=128: finally resize image size to width given + bool test_mode; // true: enable test mode for cup icons (TPL only) int width; // width of image int height; // height of image Color_t color; // default color @@ -1019,18 +1059,49 @@ uint MedianCut /////////////////////////////////////////////////////////////////////////////// /////////////// TPL support /////////////// /////////////////////////////////////////////////////////////////////////////// -// [[tpl_header_t]] -#define TPL_MAGIC_NUM 0x0020AF30 +#define TPL_MAGIC_NUM 0x0020AF30 +#define TPL_EX_MAGIC_NUM 0x54504c78 + +/////////////////////////////////////////////////////////////////////////////// +// [[tpl_header_t]] typedef struct tpl_header_t { - u8 magic[4]; // always TPL_MAGIC_NUM +// [[tpl-ex+]] + u8 magic[4]; // TPL_MAGIC_NUM u32 n_image; // number of images u32 imgtab_off; // image table offset relative to file start } __attribute__ ((packed)) tpl_header_t; +/////////////////////////////////////////////////////////////////////////////// +// [[tpl_header_ex_t]] + +typedef struct tpl_header_ex_t +{ +// [[tpl-ex+]] + u8 magic[4]; // TPL_MAGIC_NUM + u32 n_image; // number of images + u32 imgtab_off; // image table offset relative to file start + + u32 ex_magic; // always TPL_EX_MAGIC_NUM + u32 ex_width; // real (icon) width + u32 ex_height; // real (icon) height + u32 ex_n_icon; // number of icons +} +__attribute__ ((packed)) tpl_header_ex_t; + +//----------------------------------------------------------------------------- + +static inline bool IsTplHeaderEx ( const void *data, uint data_size ) +{ + const tpl_header_ex_t *tpl = (tpl_header_ex_t*)data; + return data_size >= sizeof(tpl_header_ex_t) + && be32(&tpl->imgtab_off) >= sizeof(tpl_header_ex_t) + && be32(&tpl->ex_magic) == TPL_EX_MAGIC_NUM; +} + /////////////////////////////////////////////////////////////////////////////// // [[tpl_imgtab_t]] @@ -1058,6 +1129,7 @@ __attribute__ ((packed)) tpl_pal_header_t; typedef struct tpl_img_header_t { +// [[tpl-ex+]] u16 height; // height of image in pixel u16 width; // width of image in pixel u32 iform; // image format @@ -1103,6 +1175,23 @@ bool SetupPointerTPL const endian_func_t * endian // endian functions ); +/////////////////////////////////////////////////////////////////////////////// +// [[tpl_signature_t]] + +typedef struct tpl_signature_t +{ + u8 magic1[8]; // always "LE-CODE\0" + u32 width; // width of image + u32 height; // height of image + u32 n_icon; // number of icons + u16 iform; // image format + u16 pform; // palette format + u8 magic2[8]; // always "Cup Icon" +} +__attribute__ ((packed)) tpl_signature_t; + +extern const tpl_signature_t TPLSignature0; + // /////////////////////////////////////////////////////////////////////////////// /////////////// BTI support /////////////// diff --git a/project/src/lib-image1.c b/project/src/lib-image1.c index 8c0f4d8..ecef9ae 100644 --- a/project/src/lib-image1.c +++ b/project/src/lib-image1.c @@ -274,11 +274,95 @@ void CopyIMG /////////////////////////////////////////////////////////////////////////////// +void ExtractIMG +( + // mipmaps are deleted + + Image_t * dest, // destination image + bool init_dest, // true: initialize 'dest' first + const Image_t * src, // valid source image + + int xbeg, // x-index of first used pixel, robust + int xend, // x-index of first not used pixel, robust + int ybeg, // y-index of first used pixel, robust + int yend // y-index of first not used pixel, robust +) +{ + DASSERT(dest); + PRINT("ExtractIMG(,,,%d,%d,%d,%d)\n",xbeg,xend,ybeg,yend); + + if (!src) + { + CopyIMG(dest,init_dest,src,false); + return; + } + + const int width = CheckIndex2ex(src->width,&xbeg,&xend); + const int height = CheckIndex2ex(src->height,&ybeg,¥d); + PRINT(" => %d..%d/%u, %d..%d/%u)\n",xbeg,xend,src->width,ybeg,yend,src->height); + + if ( !xbeg && xend == src->width && !ybeg && yend == src->height || width <= 0 || height <= 0 ) + { + CopyIMG(dest,init_dest,src,false); + return; + } + + //--- setup new image data + + Image_t temp; + InitializeIMG(&temp); + ConvertToRGB(&temp,src,PAL_INVALID); + DASSERT( temp.iform == IMG_X_RGB ); + + const uint bytes_per_pixel = 4; + const uint xwidth = EXPAND8(width); + const uint xheight = EXPAND8(height); + const uint data_size = xwidth * xheight * bytes_per_pixel; + u8 *data = MALLOC(data_size); + memset(data,0xff,data_size); + PRINT(" - new image: %u*%u -> %u*%u -> %u bytes\n", + width, height, xwidth, xheight, data_size ); + + const uint copy_line_size = (xend-xbeg) * bytes_per_pixel; + const uint dest_line_size = bytes_per_pixel * xwidth; + const uint src_line_size = bytes_per_pixel * src->xwidth; + const u8 * src1 = src->data + xbeg * bytes_per_pixel + ybeg * src_line_size; + u8 * dest1 = data; + + for ( int y = ybeg; y < yend; y++ ) + { + memcpy(dest1,src1,copy_line_size); + dest1 += dest_line_size; + src1 += src_line_size; + } + + if (init_dest) + InitializeIMG(dest); + FreeIMG(dest,src); + + dest->data = data; + dest->data_alloced = true; + dest->width = width; + dest->height = height; + dest->xwidth = xwidth; + dest->xheight = xheight; + dest->data_size = data_size; + dest->iform = IMG_X_RGB; + NormalizeFrameIMG(dest); + + PRINT0(" - new image: %u*%u -> %u*%u -> %u bytes\n", + dest->width, dest->height, dest->xwidth, dest->xheight, dest->data_size ); + + ResetIMG(&temp); +} + +/////////////////////////////////////////////////////////////////////////////// + void MoveIMG ( Image_t * dest, // destination image bool init_dest, // true: initialize 'dest' first - Image_t * src // NULL or source image, isresetted + Image_t * src // NULL or source image, is initialized ) { DASSERT(dest); @@ -369,11 +453,14 @@ void ScanDataIMG img->info_fform = GetByMagicFF(data,data_size,0); // [[magic]] switch (img->info_fform) { +// [[tpl-ex+]] + case FF_CUPICON: case FF_TPL: + case FF_TPLX: { - const tpl_header_t * tpl; - const tpl_pal_header_t * tp; - const tpl_img_header_t * ti; + const tpl_header_t *tpl; + const tpl_pal_header_t *tp; + const tpl_img_header_t *ti; if (SetupPointerTPL( data, data_size, 0, &tpl, 0, &tp, &ti, 0, 0, &be_func )) { @@ -382,6 +469,14 @@ void ScanDataIMG img->width = be16(&ti->width); img->height = be16(&ti->height); img->info_n_image = be32(&tpl->n_image); +// [[tpl-ex+]] + if ( img->info_fform == FF_TPLX ) + { + tpl_header_ex_t *tplx = (tpl_header_ex_t*)tpl; + img->width = be32(&tplx->ex_width); + img->height = be32(&tplx->ex_height); + } + if (tp) img->pform = img->info_pform = be32(&tp->pform); } diff --git a/project/src/lib-image2.c b/project/src/lib-image2.c index ae4f75c..d005ec5 100644 --- a/project/src/lib-image2.c +++ b/project/src/lib-image2.c @@ -134,11 +134,14 @@ enumError AssignIMG switch (fform) { +// [[tpl-ex+]] + //case FF_CUPICON: never defined by magic case FF_TPL: + case FF_TPLX: { - const tpl_header_t * tpl; - const tpl_pal_header_t * tp; - const tpl_img_header_t * ti; + const tpl_header_t *tpl; + const tpl_pal_header_t *tp; + const tpl_img_header_t *ti; if (SetupPointerTPL( data, data_size, img_index, &tpl, 0, &tp, &ti, @@ -149,6 +152,14 @@ enumError AssignIMG height = be16(&ti->height); n_img = be32(&tpl->n_image); +// [[tpl-ex+]] + if ( fform == FF_TPLX ) + { + tpl_header_ex_t *tplx = (tpl_header_ex_t*)tpl; + width = be32(&tplx->ex_width); + height = be32(&tplx->ex_height); + } + if (tp) { pform = be32(&tp->pform); @@ -684,6 +695,13 @@ static enumError CreateGenericCupIconIMG { par->force_width = str2ul(text.ptr+1,0,10); PRINT0(">>>>> width %u\n",par->force_width); + continue; + } + + if (!memcmp(text.ptr,":test",5)) + { + par->test_mode = true; + continue; } Image_t cupicon; @@ -748,6 +766,7 @@ static enumError CreateGenericCupIconIMG } img->is_cup_icon = true; + img->test_mode = par->test_mode; return err; } @@ -895,6 +914,7 @@ void SetupMipmapOptions ( MipmapOptions_t *mmo ) //memset(mmo,0,sizeof(*mmo)); mmo->valid = true; + mmo->is_tpl = false; if (opt_n_images) { @@ -916,13 +936,14 @@ void SetupMipmapOptions ( MipmapOptions_t *mmo ) /////////////////////////////////////////////////////////////////////////////// -void SetupMipmapOptions1 ( MipmapOptions_t *mmo ) +void SetupMipmapOptionsTPL ( MipmapOptions_t *mmo ) { DASSERT(mmo); //memset(mmo,0,sizeof(*mmo)); mmo->valid = true; mmo->force = true; + mmo->is_tpl = true; mmo->n_mipmap = 0; mmo->n_image = 1; mmo->min_size = 1; @@ -1083,10 +1104,14 @@ static enumError PrepareImages //--- copy & convert images CopyIMG(&mmi->img,true,src_img,false); - Transform2InternIMG(&mmi->img); - enumError err = ExecTransformIMG(&mmi->img); - if (err) - return err; + const bool is_tpl = mmi->mmo.is_tpl; + if (!is_tpl) + { + Transform2InternIMG(&mmi->img); + enumError err = ExecTransformIMG(&mmi->img); + if (err) + return err; + } //--- calculate image size @@ -1095,24 +1120,27 @@ static enumError PrepareImages if ( !geo || geo->is_x ) return ERROR0(ERR_INTERNAL,0); - uint ni, size = 0; - uint wd = mmi->img.width; - uint ht = mmi->img.height; - uint n_image = mmi->mmo.n_image; + uint size = 0; + uint wd = mmi->img.width; + uint ht = mmi->img.height; + uint n_image = mmi->mmo.n_image; - for ( ni = 0; ni < n_image; ni++ ) + for ( int ni = 0; ni < n_image; ni++ ) { size += CalcImageSize( wd, ht, geo->bits_per_pixel, geo->block_width, geo->block_height, 0,0,0,0 ); if (!ni) mmi->img.info_size = size; - wd /= 2; - ht /= 2; - DASSERT( opt_min_mipmap_size >= 1 ); - if ( wd < mmi->mmo.min_size || ht < mmi->mmo.min_size ) + if (!is_tpl) { - n_image = ni + 1; - break; + wd /= 2; + ht /= 2; + DASSERT( opt_min_mipmap_size >= 1 ); + if ( wd < mmi->mmo.min_size || ht < mmi->mmo.min_size ) + { + n_image = ni + 1; + break; + } } } @@ -1126,7 +1154,7 @@ static enumError PrepareImages /////////////////////////////////////////////////////////////////////////////// -static enumError PrepareImages1 +static enumError PrepareImagesTPL ( mipmap_info_t * mmi, // valid mipmap info const Image_t * src_img // pointer to source image @@ -1141,7 +1169,7 @@ static enumError PrepareImages1 DASSERT(src_img); MipmapOptions_t mmo; - SetupMipmapOptions1(&mmo); + SetupMipmapOptionsTPL(&mmo); return PrepareImages(mmi,src_img,&mmo); } @@ -1150,7 +1178,8 @@ static enumError PrepareImages1 static enumError WriteImageData ( mipmap_info_t * mmi, // valid mipmap info - u8 * data // destination buffer + u8 * data, // destination buffer + u8 ** p_dest // not NULL: store next destination ) { DASSERT(mmi); @@ -1158,6 +1187,8 @@ static enumError WriteImageData const Image_t *img = &mmi->img; memcpy(data,img->data,img->info_size); + if (p_dest) + *p_dest = data + img->info_size; if (!mmi->n_mipmap) return ERR_OK; @@ -1198,6 +1229,8 @@ static enumError WriteImageData memcpy(dest,temp.data,temp.data_size); dest += temp.data_size; } + if (p_dest) + *p_dest = dest; ResetIMG(&temp); ResetIMG(&mmi->img); @@ -1229,7 +1262,10 @@ enumError SaveIMG switch(fform) { - case FF_TPL: return SaveTPL(img,f,fname,overwrite); +// [[tpl-ex+]] + case FF_CUPICON: + case FF_TPL: + case FF_TPLX: return SaveTPL(img,fform,f,fname,overwrite); case FF_BTI: return SaveBTI(img,mmo,f,fname,overwrite); case FF_TEX: return SaveTEX(img,mmo,f,fname,overwrite,false); case FF_TEX_CT: return SaveTEX(img,mmo,f,fname,overwrite,true); @@ -1260,10 +1296,20 @@ void ResetRawTPL ( tpl_raw_t *raw ) //----------------------------------------------------------------------------- +const tpl_signature_t TPLSignature0 = +{ + "LE-CODE\0", + 0, 0, 0, 0, 0, + "Cup Icon" +}; + +//----------------------------------------------------------------------------- + enumError CreateRawTPL ( - tpl_raw_t * raw, // results with alloced data - Image_t * src_img // pointer to valid source img + tpl_raw_t * raw, // results with alloced data + Image_t * src_img, // pointer to valid source img + file_format_t fform // FF_TPL or FF_TPLX ) { DASSERT(src_img); @@ -1273,8 +1319,59 @@ enumError CreateRawTPL //--- special handling for cup icons - if ( src_img->is_cup_icon && !n_transform ) + bool create_tplx = fform == FF_TPLX; + if ( fform == FF_CUPICON || src_img->is_cup_icon && !n_transform ) // no forced transformation + { ConvertIMG(src_img,false,0,IMG_CMPR,PAL_INVALID); + create_tplx = true; + } + else + { + Transform2InternIMG(src_img); + const enumError err = ExecTransformIMG(src_img); + if (err) + return err; + } + + PRINT("is_cup_icon=%d, test_mode=%d, ff=%s\n", + src_img->is_cup_icon,src_img->test_mode,GetImageFormatName(src_img->iform,"?")); + + if (create_tplx) + FreeMipmapsIMG(src_img); + + + //--- TPLx calculations + + const ImageGeometry_t *geo = GetImageGeometry(src_img->iform); + if (!geo) + return ERROR0(ERR_INTERNAL,0); + + int ex_width, ex_height, ex_fill; + if (create_tplx) + { + // add 1 for special line + uint max_lines = MAX_IMAGE_HEIGHT / geo->block_height; + const uint n_lines = ( src_img->height + 2*geo->block_height - 1 ) / geo->block_height; + if ( src_img->test_mode && max_lines >= n_lines ) + max_lines = (n_lines-1) / geo->block_height * geo->block_height; + const uint n_cols = ( n_lines + max_lines - 1 ) / max_lines; + + ex_width = src_img->width * n_cols; + ex_height = ( n_lines + n_cols - 1 ) / n_cols * geo->block_height; + ex_fill = ( ex_width * ex_height - src_img->width * src_img->height ) + * geo->bits_per_pixel / 8; + + PRINT("TPLx: %u*%u, cols=%d, lines=%d/%d, geo=%d*%d => %d*%d, fill:%x\n", + src_img->width, src_img->height, + n_cols, n_lines, max_lines, geo->block_width, geo->block_height, + ex_width, ex_height, ex_fill ); + } + else + { + ex_width = src_img->width < MAX_IMAGE_WIDTH ? src_img->width : MAX_IMAGE_WIDTH; + ex_height = src_img->height < MAX_IMAGE_HEIGHT ? src_img->height : MAX_IMAGE_HEIGHT; + ex_fill = 0; + } //--- setup images @@ -1287,7 +1384,8 @@ enumError CreateRawTPL enumError err = ERR_OK; const uint align = 0x20; - const uint tab_off = sizeof(tpl_header_t); +// [[tpl-ex+]] + const uint tab_off = create_tplx ? sizeof(tpl_header_ex_t) : sizeof(tpl_header_t); uint data_off = tab_off + n_image * sizeof(tpl_imgtab_t); mipmap_info_t *m = mmi; @@ -1300,7 +1398,7 @@ enumError CreateRawTPL for ( i = 0; i < n_image; i++, m++, img = img->mipmap ) { DASSERT(img); - err = PrepareImages1(m,img); + err = PrepareImagesTPL(m,img); if (err) return err; @@ -1324,10 +1422,13 @@ enumError CreateRawTPL for ( i = 0, m = mmi; i < n_image; i++, m++ ) { m->img_data_off = data_off; - m->img_data_size = m->image_size; - data_off = ALIGN32( m->img_data_off + m->img_data_size, align ); + uint data_size = m->image_size; + m->img_data_size = data_size; + if (!i) + data_size += ex_fill; + data_off = ALIGN32( m->img_data_off + data_size, align ); - PRINT("%6x %6x %6x | %6x %6x %6x | %6x = %6u\n", + PRINT0("%6x %6x %6x | %6x %6x %6x | %6x = %6u\n", m->pal_head_off, m->pal_data_off, m->pal_data_size, m->img_head_off, m->img_data_off, m->img_data_size, data_off, data_off ); @@ -1342,11 +1443,21 @@ enumError CreateRawTPL const endian_func_t * endian = src_img->endian; raw->endian = endian; - tpl_header_t * tpl = (tpl_header_t*)data; +// [[tpl-ex+]] + tpl_header_ex_t *tpl = (tpl_header_ex_t*)data; endian->wr32(tpl->magic,TPL_MAGIC_NUM); endian->wr32(&tpl->n_image,n_image); endian->wr32(&tpl->imgtab_off,tab_off); +// [[tpl-ex+]] + if (create_tplx) + { + endian->wr32(&tpl->ex_magic,TPL_EX_MAGIC_NUM); + endian->wr32(&tpl->ex_width,src_img->width); + endian->wr32(&tpl->ex_height,src_img->height); + endian->wr32(&tpl->ex_n_icon,src_img->height/src_img->width); + } + tpl_imgtab_t * tab = (tpl_imgtab_t*)( data + tab_off ); @@ -1366,17 +1477,35 @@ enumError CreateRawTPL memcpy( data + m->pal_data_off, m->img.pal, 2*m->img.n_pal ); } +// [[tpl-ex+]] tpl_img_header_t * ti = (tpl_img_header_t*)( data + m->img_head_off ); - endian->wr16( &ti->width, m->img.width ); - endian->wr16( &ti->height, m->img.height ); + endian->wr16( &ti->width, ex_width ); + endian->wr16( &ti->height, ex_height ); endian->wr32( &ti->iform, m->img.iform ); endian->wr32( &ti->data_off, m->img_data_off ); endian->wr32( &ti->min_filter, 1 ); endian->wr32( &ti->mag_filter, 1 ); - err = WriteImageData( m, data + m->img_data_off ); + u8 *dest; + err = WriteImageData( m, data + m->img_data_off, &dest ); if (err) return err; + PRINT0("DEST: %p - %p = %zx\n", dest, data + m->img_data_off, dest - (data + m->img_data_off) ); + + if ( !i && ex_fill ) + { + memset(dest,0,ex_fill); + if ( ex_fill >= sizeof(tpl_signature_t) ) + { + tpl_signature_t *sig = (tpl_signature_t*)( dest + ex_fill ) -1; + *sig = TPLSignature0; + endian->wr32(&sig->width,src_img->width); + endian->wr32(&sig->height,src_img->height); + endian->wr32(&sig->n_icon,src_img->height/src_img->width); + endian->wr16(&sig->iform,src_img->iform); + endian->wr16(&sig->pform,src_img->pform); + } + } } raw->valid = true; @@ -1385,9 +1514,29 @@ enumError CreateRawTPL //----------------------------------------------------------------------------- +enumError SaveRawTPL +( + tpl_raw_t *raw, // raw data created by CreateRawTPL() + FILE *f, // output file, if NULL then use fname+overwrite + ccp fname, // filename of source + bool overwrite // true: allow overwriting +) +{ + DASSERT(raw); + DASSERT(fname); + PRINT("SaveRawTPL(o=%d) %s\n", overwrite, fname ); + + return raw->valid + ? SaveFILE2(f,fname,0,overwrite,raw->data.ptr,raw->data.len,0) + : ERR_ERROR; +} + +//----------------------------------------------------------------------------- + enumError SaveTPL ( Image_t *src_img, // pointer to valid source img + file_format_t fform, // FF_TPL or FF_TPLX FILE *f, // output file, if NULL then use fname+overwrite ccp fname, // filename of source bool overwrite // true: allow overwriting @@ -1396,12 +1545,13 @@ enumError SaveTPL DASSERT(src_img); DASSERT(fname); - PRINT("SaveTPL(o=%d) %s\n", overwrite, fname ); + PRINT("SaveTPL(ff=%s,o=%d) %s\n", GetNameFF(fform,fform), overwrite, fname ); tpl_raw_t raw; - enumError err = CreateRawTPL(&raw,src_img); + enumError err = CreateRawTPL(&raw,src_img,fform); if (raw.valid) - err = SaveFILE2(f,fname,0,overwrite,raw.data.ptr,raw.data.len,0); + err = SaveRawTPL(&raw,f,fname,overwrite); +// err = SaveFILE2(f,fname,0,overwrite,raw.data.ptr,raw.data.len,0); ResetRawTPL(&raw); return err; } @@ -1478,7 +1628,7 @@ enumError SaveBTI bti->wrap_t = 1; } - err = WriteImageData(&mmi,data+data_off); + err = WriteImageData(&mmi,data+data_off,0); if (!err) err = SaveFILE2(f,fname,0,overwrite,data,total_size,0); @@ -1564,7 +1714,7 @@ enumError SaveTEX endian->wr32(&ti->n_image,mmi.n_mipmap+1); endian->wrf4(&ti->image_val,mmi.n_mipmap); - err = WriteImageData(&mmi,data+grp_off); + err = WriteImageData(&mmi,data+grp_off,0); if (!err) err = SaveFILE2(f,fname,0,overwrite,data,total_size,0); @@ -1635,7 +1785,7 @@ enumError SaveBREFTIMG bi->iform = mmi.img.iform; bi->n_image = mmi.n_mipmap + 1; - err = WriteImageData(&mmi,data+img_off); + err = WriteImageData(&mmi,data+img_off,0); if (!err) err = SaveFILE2(f,fname,0,overwrite,data,total_size,0); @@ -2476,7 +2626,10 @@ const KeywordTab_t cmdtab_transform[] = { //--- file formats +// [[tpl-ex+]] { FF_TPL, "TPL", 0, TM_IDX_FILE|TM_F_PAL }, + { FF_TPLX, "TPLx", "TPLX", TM_IDX_FILE|TM_F_PAL }, + { FF_CUPICON, "CUPICON", "CUP", TM_IDX_FILE }, { FF_BTI, "BTI", 0, TM_IDX_FILE|TM_F_PAL }, { FF_TEX, "TEX", "TEX0", TM_IDX_FILE }, { FF_BREFT_IMG, "BREFT-IMG", "BREFTIMG", TM_IDX_FILE }, @@ -2535,14 +2688,15 @@ const KeywordTab_t cmdtab_transform[] = }; /////////////////////////////////////////////////////////////////////////////// +// [[transform_term_t]] typedef struct transform_term_t { ccp arg; char res[TM_IDX_N]; uint opt[TM_IDX_N]; - -} transform_term_t; +} +transform_term_t; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -2676,6 +2830,12 @@ int ScanOptTransform ( ccp arg ) memcpy(t->src,sterm.res,sizeof(t->src)); memcpy(t->dest,dterm.res,sizeof(t->dest)); + // special case: destionation is FF_CUPICON + if ( t->src[TM_IDX_FILE] == FF_CUPICON ) + t->src[TM_IDX_FILE] = FF_TPLX; + if ( t->dest[TM_IDX_FILE] == FF_CUPICON ) + t->dest[TM_IDX_IMG] = IMG_CMPR; + src = sterm.arg; if ( !src ) break; @@ -2722,17 +2882,17 @@ void DumpTransformList ( FILE * f, int indent, bool force ) return; fprintf(f,"\n" - "%*s source formats -> destination formats\n" - "%*s file image palette pal color alph -> file image palette pal color alph\n" - "%*s--------------------------------------------------------------------------------\n", + "%*s file source formats -> file destination formats\n" + "%*s type image palette pal color alph -> type image palette pal color alph\n" + "%*s----------------------------------------------------------------------------------\n", indent, "", indent, "", indent, "" ); uint i; for ( i = 0; i < n_transform; i++ ) { const transform_t *t = transform + i; fprintf(f, - "%*s %-6s %-6s %-7s %-4.4s %-5s %-4.4s" - " -> %-6s %-6s %-7s %-4.4s %-5s %-4.4s\n", + "%*s %-7s %-6s %-7s %-4.4s %-5s %-4.4s" + " -> %-7s %-6s %-7s %-4.4s %-5s %-4.4s\n", indent, "", GetTransformName(0,t->src[0],"*"), GetTransformName(1,t->src[1],"*"), @@ -3372,7 +3532,8 @@ uint GetNImagesTPL DASSERT(data); DASSERT(endian); - return data_size >= sizeof(tpl_header_t) && endian->rd32(data) == TPL_MAGIC_NUM +// [[tpl-ex+]] + return data_size >= sizeof(tpl_header_t) && endian->rd32(data) == TPL_MAGIC_NUM ? endian->rd32(data+4) : 0; } @@ -3396,6 +3557,7 @@ bool SetupPointerTPL DASSERT(data); DASSERT(endian); +// [[tpl-ex+]] if ( data_size >= sizeof(tpl_header_t) && endian->rd32(data) == TPL_MAGIC_NUM ) { const tpl_header_t *tpl = (tpl_header_t*)data; diff --git a/project/src/lib-image3.c b/project/src/lib-image3.c index b3782c9..4e95d2d 100644 --- a/project/src/lib-image3.c +++ b/project/src/lib-image3.c @@ -953,11 +953,13 @@ enumError SmartResizeIMG //--- analyze width and height + #if 0 if ( !src->width || !src->height ) { CopyIMG(dest,false,src,true); return ERR_OK; } + #endif if (!width) { @@ -1756,9 +1758,9 @@ int PrintImage if (long_count) { if ( img.width && img.height ) - printf(" %4u*%-4u -",img.width,img.height); + printf(" %4u*%-4u -",img.width,img.height); else - fputs(" - -",stdout); + fputs(" - -",stdout); } if (long_count>1) fputs(" --- - ",stdout); diff --git a/project/src/lib-kmp.c b/project/src/lib-kmp.c index 93df251..ce989a3 100644 --- a/project/src/lib-kmp.c +++ b/project/src/lib-kmp.c @@ -5758,6 +5758,8 @@ int InsertSecondKTPT stat = 1; ktpt = InsertList(kmp->dlist+KMP_KTPT,1); } + // avoid Cygwin warning + ktpt = (kmp_ktpt_entry_t*)kmp->dlist[KMP_KTPT].list + 1; DASSERT(ktpt); memset(ktpt,0,sizeof(*ktpt)); diff --git a/project/src/lib-lecode.c b/project/src/lib-lecode.c index de4fb20..4dd1078 100644 --- a/project/src/lib-lecode.c +++ b/project/src/lib-lecode.c @@ -120,7 +120,6 @@ int ScanOptTrackSource ( ccp arg, int arg_len, int mode ) && !FindParamField(&opt_track_source,path) ) { -// [[%04x-]] PRINT("APPEND TRACK_SOURCE: 0x%03x %s\n",mode,path); if (!opt_track_source.field) InitializeParamField(&opt_track_source); @@ -3429,8 +3428,9 @@ void DumpLEAnalyse ( FILE *f, uint indent, const le_analyze_t *ana ) } if ( ana->param_size >= sizeof(le_binpar_v1_276_t) ) - fprintf(f,"%*s" "Cup image size: %u x %u pixels\n" - ,indent,"", h->cup_icon_size, h->cup_icon_size ); + fprintf(f,"%*s" "Cup icon size: %u x %u pixels (%u bytes)\n" + ,indent,"", h->cup_icon_size, h->cup_icon_size + ,h->cup_icon_size * h->cup_icon_size / 2 ); if ( ana->param_size >= sizeof(le_binpar_v1_277_t) ) fprintf(f,"%*s" "Slot format: %u = \"%%0%ux\"\n" @@ -3663,7 +3663,6 @@ void TransferTrackFile struct stat st; if ( !stat(src,&st) && S_ISREG(st.st_mode) ) { -// [[%04x+]] ccp format = lecode_04x ? "%s/%04x.szs" : "%s/%03x.szs"; snprintf(dest,sizeof(dest),format,opt_track_dest,dest_slot); if (!TransferFile(log,dest,src,ptr->num|flags,0666)) @@ -3671,7 +3670,6 @@ void TransferTrackFile PathCatBufPPE(src,sizeof(src),ptr->key,src_name,"_d.szs"); if ( !stat(src,&st) && S_ISREG(st.st_mode) ) { -// [[%04x+]] ccp format = lecode_04x ? "%s/%04x_d.szs" : "%s/%03x_d.szs"; snprintf(dest,sizeof(dest),format,opt_track_dest,dest_slot); TransferFile(log,dest,src,ptr->num|flags,0666); @@ -3697,14 +3695,12 @@ void TransferTrackBySlot flags &= TFMD_M_FLAGS; char dest[PATH_MAX], src[PATH_MAX]; -// [[%04x+]] x2 ccp format = lecode_04x ? "%s/%04x.szs" : "%s/%03x.szs"; snprintf( dest, sizeof(dest), format, opt_track_dest, dest_slot ); snprintf( src, sizeof(src), format, opt_track_dest, src_slot ); if (!TransferFile(log,dest,src,TFMD_LINK|flags,0666)) { -// [[%04x+]] x2 ccp format = lecode_04x ? "%s/%04x_d.szs" : "%s/%03x_d.szs"; snprintf( dest, sizeof(dest), format, opt_track_dest, dest_slot ); snprintf( src, sizeof(src), format, opt_track_dest, src_slot ); diff --git a/project/src/lib-ledis.c b/project/src/lib-ledis.c index 6939a77..9a1bb1e 100644 --- a/project/src/lib-ledis.c +++ b/project/src/lib-ledis.c @@ -1546,7 +1546,6 @@ ccp GetPathL2 ( le_distrib_t *ld, const le_track_t *lt, le_options_t opt, ccp re } char buf[20]; -// [[%04x+]] snprintf(buf,sizeof(buf), lecode_04x ? "%04x" : "%03x", lt->track_slot ); TransferMode_t tfer_mode; ccp found = FindTrackFile(buf,&tfer_mode); @@ -1572,7 +1571,6 @@ ccp GetPathL2 ( le_distrib_t *ld, const le_track_t *lt, le_options_t opt, ccp re if ( len > 0 && path[len-1] == '/' ) { char newpath[PATH_MAX]; -// [[%04x+]] ccp format = lecode_04x ? "%s%04x.szs" : "%s%03x.szs"; snprintf(newpath,sizeof(newpath),format,path,lt->track_slot); SetPathLT((le_track_t*)lt,&par,newpath); @@ -4237,7 +4235,6 @@ enumError AddToArchLD ( le_distrib_t *ld, raw_data_t *raw ) if ( ld->spar.opt & LEO_HEX2SLOT && ( spf.f_name.len == 3 || spf.f_name.len == 4 )) { const uint slot = str2ul(spf.f_name.ptr,0,16); -// [[%04x+]] snprintf(fname_buf,sizeof(fname_buf),"%03x",slot); if (!strncasecmp(spf.f_name.ptr,fname_buf,3)) { @@ -4651,7 +4648,6 @@ void ImportAnaLD ( le_distrib_t *ld, const le_analyze_t *ana ) if (ana->flags) lt->flags = ana->flags[slot]; char name[30]; -// [[%04x+]] snprintf(name,sizeof(name), lecode_04x ? "_%04x" : "_%03x", slot ); SetNameLT(lt,0,name); } @@ -6442,6 +6438,7 @@ enumError CreateCupIconsLD ( ld_out_param_t *lop, mem_t mem_opt, bool print_info O_GAME = 0x0080, O_XGAME = 0x0100, O_SPACE = 0x0200, + O_TEST = 0x0400, O_CHARS = 0x1000, O_M_CHARS = 0xf000, @@ -6468,6 +6465,7 @@ enumError CreateCupIconsLD ( ld_out_param_t *lop, mem_t mem_opt, bool print_info { O_GAME, "GAME", 0, 0 }, { O_XGAME, "XGAME", 0, 0 }, { O_SPACE, "SPACE", 0, 0 }, + { O_TEST, "TEST", 0, 0 }, { 0*O_CHARS, "0", 0, O_M_CHARS }, { 1*O_CHARS, "1", 0, O_M_CHARS }, @@ -6539,6 +6537,9 @@ enumError CreateCupIconsLD ( ld_out_param_t *lop, mem_t mem_opt, bool print_info if (!opt) opt = O__DEFAULT; + if ( opt & O_TEST ) + dest = StringCopyE(dest,bufend,":test\n"); + const uint pix = (( opt & O_M_PIXEL ) >> O_S_PIXEL ) * O_PIXEL_FACTOR; if ( pix && pix != 128 ) dest = snprintfE(dest,bufend,":%upx\n",pix); @@ -6638,7 +6639,8 @@ enumError CreateCupIconsLD ( ld_out_param_t *lop, mem_t mem_opt, bool print_info err = CreateGenericIMG(&genpar,&img,true); if (!err) { - const file_format_t fform = GetImageFFByFName(lop->fname,FF_TPL,true); +// [[tpl-ex+]] + const file_format_t fform = GetImageFFByFName(lop->fname,FF_CUPICON,true); err = SaveIMG(&img,fform,0,lop->f,lop->fname,false); } } @@ -8218,7 +8220,7 @@ static void load_file_lta { DASSERT(lm); DASSERT(rec); - DASSERT(path); + DASSERT(fname); progress_lta(lm,false); diff --git a/project/src/lib-lzma.c b/project/src/lib-lzma.c index 4f61945..887d8a0 100644 --- a/project/src/lib-lzma.c +++ b/project/src/lib-lzma.c @@ -450,7 +450,7 @@ enumError DecodeLZMApart uint src_size // size of source buffer ) { - DASSERT(dest_ptr); + DASSERT(dest_buf); DASSERT(dest_written); DASSERT( src || !src_size ); diff --git a/project/src/lib-std.h b/project/src/lib-std.h index 8a199ba..6ff932c 100644 --- a/project/src/lib-std.h +++ b/project/src/lib-std.h @@ -121,6 +121,7 @@ void LogSHA1 ( ccp func, ccp file, uint line, cvp data, uint size, ccp info ); #define M1(a) ( (typeof(a))~0 ) #define IS_M1(a) ( (a) == (typeof(a))~0 ) + // /////////////////////////////////////////////////////////////////////////////// /////////////// Setup /////////////// @@ -777,6 +778,9 @@ void SetCompressionFF // and 'fform_compr_force' ); +static inline bool IsTplFF ( file_format_t ff ) + { return ff == FF_TPL || ff == FF_TPLX || ff == FF_CUPICON; } + file_format_t IsImageFF ( // returns the normalized FF for a valid image or NULL (=FF_UNKNOWN) diff --git a/project/src/lib-szs-create.c b/project/src/lib-szs-create.c index 3f698ec..42e31d6 100644 --- a/project/src/lib-szs-create.c +++ b/project/src/lib-szs-create.c @@ -489,7 +489,10 @@ enumError CreateSZS ext = ".obj"; break; +// [[tpl-ex+]] + case FF_CUPICON: case FF_TPL: + case FF_TPLX: case FF_BTI: case FF_TEX: case FF_TEX_CT: @@ -1653,7 +1656,7 @@ bool NormalizeExSZS if (!err) { img.is_cup_icon = true; - CreateRawTPL(&raw,&img); + CreateRawTPL(&raw,&img,FF_CUPICON); } if (!raw.valid) opt_cup_icons = 0; @@ -1665,9 +1668,10 @@ bool NormalizeExSZS .data = (u8*)raw.data.ptr, .size = raw.data.len, .print_err = true }; am.log_indent = verbose >= 1 || logging >= 2 ? 2 : -1; - AddMissingFile("button/timg/ct_icons.tpl",FF_TPL,&am); +// [[tpl-ex+]] 2x + AddMissingFile("button/timg/ct_icons.tpl",FF_CUPICON,&am); am.link = am.last_subfile; // link always to save space - AddMissingFile("control/timg/ct_icons.tpl",FF_TPL,&am); + AddMissingFile("control/timg/ct_icons.tpl",FF_CUPICON,&am); } } @@ -2317,6 +2321,15 @@ static int IterateFilesTPL StringCopyS(it->path,sizeof(it->path),".TPL.header"); it->func_it(it,false); + if (IsTplHeaderEx(data,szs->size)) + { + it->index++; + it->off = sizeof(tpl_header_t); + it->size = sizeof(tpl_header_ex_t) - sizeof(tpl_header_t); + StringCopyS(it->path,sizeof(it->path),".TPL.header.ex"); + it->func_it(it,false); + } + it->index++; it->off = (u8*)tab - data; it->size = sizeof(tpl_imgtab_t) * n_img; @@ -2815,6 +2828,7 @@ static void patch_9laps ( struct szs_iterator_t *it ) add_missing_t am = { .szs = it->szs, .norm = &it->norm_create, .data = (u8*)cm->data, .size = cm->size, .print_err = true }; am.log_indent = verbose >= 1 || logging >= 2 ? 2 : -1; +// [[tpl-ex-]] AddMissingFile(ptr->fname,FF_TPL,&am); it->job_create = true; } @@ -2884,7 +2898,7 @@ static void patch_title_screen ( struct szs_iterator_t *it ) { ConvertIMG(&img,false,0,IMG_RGB565,PAL_AUTO); tpl_raw_t raw = {0}; - CreateRawTPL(&raw,&img); + CreateRawTPL(&raw,&img,FF_TPL); if (raw.valid) { patch_file(it,raw.data.ptr,raw.data.len,true,false); @@ -3275,7 +3289,10 @@ void SetupExtendedSZS() cut_iter_func[FF_PAT] = IterateFilesPAT; cut_iter_func[FF_TEX] = IterateFilesTEX; cut_iter_func[FF_TEX_CT] = IterateFilesTEX; +// [[tpl-ex+]] cut_iter_func[FF_TPL] = IterateFilesTPL; + cut_iter_func[FF_TPLX] = IterateFilesTPL; + cut_iter_func[FF_CUPICON] = IterateFilesTPL; cut_iter_func[FF_BTI] = IterateFilesBTI; //std_iter_func[FF_TEX_CT] = IterateFilesTEX; @@ -4915,7 +4932,10 @@ static int extract_func } break; +// [[tpl-ex+]] case FF_TPL: + case FF_TPLX: + case FF_CUPICON: if (analyze_fname) AnalyzeTPL(szs,subszs.data,subszs.size,it->name); diff --git a/project/src/lib-szs.c b/project/src/lib-szs.c index ff0a82e..7f7631d 100644 --- a/project/src/lib-szs.c +++ b/project/src/lib-szs.c @@ -3695,7 +3695,6 @@ int IterateFilesLTA } } -// [[%04x+]] ccp format_szs, format_lfl, format_d_szs, format_d_lfl; if ( lecode_04x || lta.base_slot + lta.n_slots >= 0x1000 ) { diff --git a/project/src/lib-xbmg.c b/project/src/lib-xbmg.c index 267835e..c67ef77 100644 --- a/project/src/lib-xbmg.c +++ b/project/src/lib-xbmg.c @@ -96,10 +96,10 @@ void SetupBMG ( ccp opt_filter_bmg ) DASSERT( MID_CT_TRACK_END <= MAX_FILTER_MSG ); DASSERT( MID_CT_CUP_REF_END <= MAX_FILTER_MSG ); - DASSERT( MID_LE_END <= MAX_FILTER_MSG ); - DASSERT( MID_LE_CUP_END <= MAX_FILTER_MSG ); - DASSERT( MID_LE_TRACK_END <= MAX_FILTER_MSG ); - DASSERT( MID_LE_CUP_REF_END <= MAX_FILTER_MSG ); + ASSERT( MID_LE_END <= MAX_FILTER_MSG ); + ASSERT( MID_LE_CUP_END <= MAX_FILTER_MSG ); + ASSERT( MID_LE_TRACK_END <= MAX_FILTER_MSG ); + ASSERT( MID_LE_CUP_REF_END <= MAX_FILTER_MSG ); //--- general setting diff --git a/project/src/ui/tab-wbmgt.inc b/project/src/ui/tab-wbmgt.inc index 98ba29a..0b5b527 100644 --- a/project/src/ui/tab-wbmgt.inc +++ b/project/src/ui/tab-wbmgt.inc @@ -210,6 +210,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wctct.inc b/project/src/ui/tab-wctct.inc index c6ea2a0..5a114d4 100644 --- a/project/src/ui/tab-wctct.inc +++ b/project/src/ui/tab-wctct.inc @@ -194,6 +194,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wimgt.inc b/project/src/ui/tab-wimgt.inc index 17e3c87..67fb5da 100644 --- a/project/src/ui/tab-wimgt.inc +++ b/project/src/ui/tab-wimgt.inc @@ -170,6 +170,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wkclt.inc b/project/src/ui/tab-wkclt.inc index a8e6d07..38207d5 100644 --- a/project/src/ui/tab-wkclt.inc +++ b/project/src/ui/tab-wkclt.inc @@ -285,6 +285,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wkmpt.inc b/project/src/ui/tab-wkmpt.inc index d8148cc..0accc19 100644 --- a/project/src/ui/tab-wkmpt.inc +++ b/project/src/ui/tab-wkmpt.inc @@ -263,6 +263,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wlect.inc b/project/src/ui/tab-wlect.inc index b61e53a..217419c 100644 --- a/project/src/ui/tab-wlect.inc +++ b/project/src/ui/tab-wlect.inc @@ -238,6 +238,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wmdlt.inc b/project/src/ui/tab-wmdlt.inc index 033bce5..b927eab 100644 --- a/project/src/ui/tab-wmdlt.inc +++ b/project/src/ui/tab-wmdlt.inc @@ -188,6 +188,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wpatt.inc b/project/src/ui/tab-wpatt.inc index 26dbb1e..39413d7 100644 --- a/project/src/ui/tab-wpatt.inc +++ b/project/src/ui/tab-wpatt.inc @@ -153,6 +153,9 @@ { T_OPT_GP, "CONFIG", "config", 0, 0 /* copy of wszst */ }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wstrt.inc b/project/src/ui/tab-wstrt.inc index 783ef45..3dd0dca 100644 --- a/project/src/ui/tab-wstrt.inc +++ b/project/src/ui/tab-wstrt.inc @@ -222,6 +222,9 @@ { H_OPT_G, "AT_DUMMY", "@|@", 0, "" }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, 0 /* copy of wszst */ }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, 0 /* copy of wszst */ }, diff --git a/project/src/ui/tab-wszst.inc b/project/src/ui/tab-wszst.inc index 25bed25..af24140 100644 --- a/project/src/ui/tab-wszst.inc +++ b/project/src/ui/tab-wszst.inc @@ -758,6 +758,10 @@ " then file @'" CONFIG_FILE "'@ is searched in different directories." " Use command @'wszst CONFIG'@ to get more details." }, + { H_OPT_G, "YDEBUG", "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." }, + { T_OPT_G, "ALLOW_ALL", "allow-all|allowall", 0, "Usually commands accept only options with impact to the command." diff --git a/project/src/ui/ui-wbmgt.c b/project/src/ui/ui-wbmgt.c index 30fad5f..c5c1055 100644 --- a/project/src/ui/ui-wbmgt.c +++ b/project/src/ui/ui-wbmgt.c @@ -333,6 +333,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -578,7 +583,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 70 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 71 }; @@ -716,6 +721,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -887,48 +893,49 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_NO_WILDCARDS, - /* 0x090 */ OPT_IN_ORDER, - /* 0x091 */ OPT_POINTS, - /* 0x092 */ OPT_UTF_8, - /* 0x093 */ OPT_NO_UTF_8, - /* 0x094 */ OPT_FORCE, - /* 0x095 */ OPT_REPAIR_MAGICS, - /* 0x096 */ OPT_OLD, - /* 0x097 */ OPT_STD, - /* 0x098 */ OPT_NEW, - /* 0x099 */ OPT_EXTRACT, - /* 0x09a */ OPT_NUMBER, - /* 0x09b */ OPT_ALIGN, - /* 0x09c */ OPT_MACRO_BMG, - /* 0x09d */ OPT_FILTER_BMG, - /* 0x09e */ OPT_BMG_ENDIAN, - /* 0x09f */ OPT_BMG_ENCODING, - /* 0x0a0 */ OPT_BMG_INF_SIZE, - /* 0x0a1 */ OPT_BMG_MID, - /* 0x0a2 */ OPT_FORCE_ATTRIB, - /* 0x0a3 */ OPT_DEF_ATTRIB, - /* 0x0a4 */ OPT_NO_ATTRIB, - /* 0x0a5 */ OPT_X_ESCAPES, - /* 0x0a6 */ OPT_OLD_ESCAPES, - /* 0x0a7 */ OPT_NO_BMG_COLORS, - /* 0x0a8 */ OPT_BMG_COLORS, - /* 0x0a9 */ OPT_NO_BMG_INLINE, - /* 0x0aa */ OPT_SECTIONS, - /* 0x0ab */ 0,0,0,0, 0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_NO_WILDCARDS, + /* 0x091 */ OPT_IN_ORDER, + /* 0x092 */ OPT_POINTS, + /* 0x093 */ OPT_UTF_8, + /* 0x094 */ OPT_NO_UTF_8, + /* 0x095 */ OPT_FORCE, + /* 0x096 */ OPT_REPAIR_MAGICS, + /* 0x097 */ OPT_OLD, + /* 0x098 */ OPT_STD, + /* 0x099 */ OPT_NEW, + /* 0x09a */ OPT_EXTRACT, + /* 0x09b */ OPT_NUMBER, + /* 0x09c */ OPT_ALIGN, + /* 0x09d */ OPT_MACRO_BMG, + /* 0x09e */ OPT_FILTER_BMG, + /* 0x09f */ OPT_BMG_ENDIAN, + /* 0x0a0 */ OPT_BMG_ENCODING, + /* 0x0a1 */ OPT_BMG_INF_SIZE, + /* 0x0a2 */ OPT_BMG_MID, + /* 0x0a3 */ OPT_FORCE_ATTRIB, + /* 0x0a4 */ OPT_DEF_ATTRIB, + /* 0x0a5 */ OPT_NO_ATTRIB, + /* 0x0a6 */ OPT_X_ESCAPES, + /* 0x0a7 */ OPT_OLD_ESCAPES, + /* 0x0a8 */ OPT_NO_BMG_COLORS, + /* 0x0a9 */ OPT_BMG_COLORS, + /* 0x0aa */ OPT_NO_BMG_INLINE, + /* 0x0ab */ OPT_SECTIONS, + /* 0x0ac */ 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, diff --git a/project/src/ui/ui-wbmgt.h b/project/src/ui/ui-wbmgt.h index c75aecf..06e69a2 100644 --- a/project/src/ui/ui-wbmgt.h +++ b/project/src/ui/ui-wbmgt.h @@ -98,6 +98,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -131,7 +132,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 70 + OPT__N_TOTAL // == 71 } enumOptions; @@ -397,6 +398,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wctct.c b/project/src/ui/ui-wctct.c index 01f3053..2b6b334 100644 --- a/project/src/ui/ui-wctct.c +++ b/project/src/ui/ui-wctct.c @@ -433,6 +433,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -715,7 +720,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " 0x3b:0x41 and 0x44:0xfe." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 90 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 91 }; @@ -913,6 +918,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -1113,67 +1119,68 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_OLD_SPINY, - /* 0x08f */ OPT_CRS1, - /* 0x090 */ OPT_CHDIR, - /* 0x091 */ OPT_ROUND, - /* 0x092 */ OPT_NO_WILDCARDS, - /* 0x093 */ OPT_IN_ORDER, - /* 0x094 */ OPT_RAW, - /* 0x095 */ OPT_BMG_ENDIAN, - /* 0x096 */ OPT_BMG_ENCODING, - /* 0x097 */ OPT_BMG_INF_SIZE, - /* 0x098 */ OPT_BMG_MID, - /* 0x099 */ OPT_FORCE_ATTRIB, - /* 0x09a */ OPT_DEF_ATTRIB, - /* 0x09b */ OPT_NO_ATTRIB, - /* 0x09c */ OPT_X_ESCAPES, - /* 0x09d */ OPT_OLD_ESCAPES, - /* 0x09e */ OPT_NO_BMG_COLORS, - /* 0x09f */ OPT_BMG_COLORS, - /* 0x0a0 */ OPT_NO_BMG_INLINE, - /* 0x0a1 */ OPT_NO_ECHO, - /* 0x0a2 */ OPT_UTF_8, - /* 0x0a3 */ OPT_NO_UTF_8, - /* 0x0a4 */ OPT_FORCE, - /* 0x0a5 */ OPT_REPAIR_MAGICS, - /* 0x0a6 */ OPT_CREATE_DISTRIB, - /* 0x0a7 */ OPT_OLD, - /* 0x0a8 */ OPT_STD, - /* 0x0a9 */ OPT_NEW, - /* 0x0aa */ OPT_EXTRACT, - /* 0x0ab */ OPT_LIST, - /* 0x0ac */ OPT_REF, - /* 0x0ad */ OPT_FULL, - /* 0x0ae */ OPT_HEX, - /* 0x0af */ OPT_CT_DIR, - /* 0x0b0 */ OPT_CT_LOG, - /* 0x0b1 */ OPT_ALLOW_SLOTS, - /* 0x0b2 */ OPT_IMAGES, - /* 0x0b3 */ OPT_LOAD_BMG, - /* 0x0b4 */ OPT_PATCH_BMG, - /* 0x0b5 */ OPT_MACRO_BMG, - /* 0x0b6 */ OPT_FILTER_BMG, - /* 0x0b7 */ OPT_PATCH_NAMES, - /* 0x0b8 */ OPT_ORDER_BY, - /* 0x0b9 */ OPT_ORDER_ALL, - /* 0x0ba */ OPT_DYNAMIC, - /* 0x0bb */ OPT_WRITE_TRACKS, - /* 0x0bc */ OPT_NUMBER, - /* 0x0bd */ OPT_SECTIONS, - /* 0x0be */ 0,0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_OLD_SPINY, + /* 0x090 */ OPT_CRS1, + /* 0x091 */ OPT_CHDIR, + /* 0x092 */ OPT_ROUND, + /* 0x093 */ OPT_NO_WILDCARDS, + /* 0x094 */ OPT_IN_ORDER, + /* 0x095 */ OPT_RAW, + /* 0x096 */ OPT_BMG_ENDIAN, + /* 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_NO_ECHO, + /* 0x0a3 */ OPT_UTF_8, + /* 0x0a4 */ OPT_NO_UTF_8, + /* 0x0a5 */ OPT_FORCE, + /* 0x0a6 */ OPT_REPAIR_MAGICS, + /* 0x0a7 */ OPT_CREATE_DISTRIB, + /* 0x0a8 */ OPT_OLD, + /* 0x0a9 */ OPT_STD, + /* 0x0aa */ OPT_NEW, + /* 0x0ab */ OPT_EXTRACT, + /* 0x0ac */ OPT_LIST, + /* 0x0ad */ OPT_REF, + /* 0x0ae */ OPT_FULL, + /* 0x0af */ OPT_HEX, + /* 0x0b0 */ OPT_CT_DIR, + /* 0x0b1 */ OPT_CT_LOG, + /* 0x0b2 */ OPT_ALLOW_SLOTS, + /* 0x0b3 */ OPT_IMAGES, + /* 0x0b4 */ OPT_LOAD_BMG, + /* 0x0b5 */ OPT_PATCH_BMG, + /* 0x0b6 */ OPT_MACRO_BMG, + /* 0x0b7 */ OPT_FILTER_BMG, + /* 0x0b8 */ OPT_PATCH_NAMES, + /* 0x0b9 */ OPT_ORDER_BY, + /* 0x0ba */ OPT_ORDER_ALL, + /* 0x0bb */ OPT_DYNAMIC, + /* 0x0bc */ OPT_WRITE_TRACKS, + /* 0x0bd */ OPT_NUMBER, + /* 0x0be */ OPT_SECTIONS, + /* 0x0bf */ 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, diff --git a/project/src/ui/ui-wctct.h b/project/src/ui/ui-wctct.h index 90c24d1..70257de 100644 --- a/project/src/ui/ui-wctct.h +++ b/project/src/ui/ui-wctct.h @@ -113,6 +113,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -151,7 +152,7 @@ typedef enum enumOptions OPT_CT_LOG, OPT_ALLOW_SLOTS, - OPT__N_TOTAL // == 90 + OPT__N_TOTAL // == 91 } enumOptions; @@ -465,6 +466,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wimgt.c b/project/src/ui/ui-wimgt.c index f762a1d..9d61c4e 100644 --- a/project/src/ui/ui-wimgt.c +++ b/project/src/ui/ui-wimgt.c @@ -299,6 +299,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -532,7 +537,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 63 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 64 }; @@ -660,6 +665,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -817,41 +823,42 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x079 */ 0,0,0,0, 0,0,0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_NO_WILDCARDS, - /* 0x090 */ OPT_IN_ORDER, - /* 0x091 */ OPT_UTF_8, - /* 0x092 */ OPT_NO_UTF_8, - /* 0x093 */ OPT_FORCE, - /* 0x094 */ OPT_REPAIR_MAGICS, - /* 0x095 */ OPT_OLD, - /* 0x096 */ OPT_STD, - /* 0x097 */ OPT_NEW, - /* 0x098 */ OPT_EXTRACT, - /* 0x099 */ OPT_NUMBER, - /* 0x09a */ OPT_MIPMAPS, - /* 0x09b */ OPT_NO_MIPMAPS, - /* 0x09c */ OPT_N_MIPMAPS, - /* 0x09d */ OPT_MAX_MIPMAPS, - /* 0x09e */ OPT_MIPMAP_SIZE, - /* 0x09f */ OPT_FAST_MIPMAPS, - /* 0x0a0 */ OPT_CMPR_DEFAULT, - /* 0x0a1 */ OPT_PRE_CONVERT, - /* 0x0a2 */ OPT_STRIP, - /* 0x0a3 */ OPT_SECTIONS, - /* 0x0a4 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_NO_WILDCARDS, + /* 0x091 */ OPT_IN_ORDER, + /* 0x092 */ OPT_UTF_8, + /* 0x093 */ OPT_NO_UTF_8, + /* 0x094 */ OPT_FORCE, + /* 0x095 */ OPT_REPAIR_MAGICS, + /* 0x096 */ OPT_OLD, + /* 0x097 */ OPT_STD, + /* 0x098 */ OPT_NEW, + /* 0x099 */ OPT_EXTRACT, + /* 0x09a */ OPT_NUMBER, + /* 0x09b */ OPT_MIPMAPS, + /* 0x09c */ OPT_NO_MIPMAPS, + /* 0x09d */ OPT_N_MIPMAPS, + /* 0x09e */ OPT_MAX_MIPMAPS, + /* 0x09f */ OPT_MIPMAP_SIZE, + /* 0x0a0 */ OPT_FAST_MIPMAPS, + /* 0x0a1 */ OPT_CMPR_DEFAULT, + /* 0x0a2 */ OPT_PRE_CONVERT, + /* 0x0a3 */ OPT_STRIP, + /* 0x0a4 */ OPT_SECTIONS, + /* 0x0a5 */ 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, diff --git a/project/src/ui/ui-wimgt.h b/project/src/ui/ui-wimgt.h index a8312be..9703127 100644 --- a/project/src/ui/ui-wimgt.h +++ b/project/src/ui/ui-wimgt.h @@ -92,6 +92,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -124,7 +125,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 63 + OPT__N_TOTAL // == 64 } enumOptions; @@ -322,6 +323,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wkclt.c b/project/src/ui/ui-wkclt.c index a537f04..3981df6 100644 --- a/project/src/ui/ui-wkclt.c +++ b/project/src/ui/ui-wkclt.c @@ -433,6 +433,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -717,7 +722,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 83 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 84 }; @@ -997,6 +1002,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -1170,62 +1176,63 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_SCALE, - /* 0x090 */ OPT_SHIFT, - /* 0x091 */ OPT_XSS, - /* 0x092 */ OPT_YSS, - /* 0x093 */ OPT_ZSS, - /* 0x094 */ OPT_ROT, - /* 0x095 */ OPT_XROT, - /* 0x096 */ OPT_YROT, - /* 0x097 */ OPT_ZROT, - /* 0x098 */ OPT_TRANSLATE, - /* 0x099 */ OPT_NULL, - /* 0x09a */ OPT_NEXT, - /* 0x09b */ OPT_ASCALE, - /* 0x09c */ OPT_AROT, - /* 0x09d */ OPT_TFORM_SCRIPT, - /* 0x09e */ OPT_KCL, - /* 0x09f */ OPT_KCL_FLAG, - /* 0x0a0 */ OPT_KCL_SCRIPT, - /* 0x0a1 */ OPT_TRI_AREA, - /* 0x0a2 */ OPT_TRI_HEIGHT, - /* 0x0a3 */ OPT_FLAG_FILE, - /* 0x0a4 */ OPT_XTRIDATA, - /* 0x0a5 */ OPT_SLOT, - /* 0x0a6 */ OPT_ID, - /* 0x0a7 */ OPT_BASE64, - /* 0x0a8 */ OPT_DB64, - /* 0x0a9 */ OPT_CODING, - /* 0x0aa */ OPT_ROUND, - /* 0x0ab */ OPT_NO_WILDCARDS, - /* 0x0ac */ OPT_IN_ORDER, - /* 0x0ad */ OPT_NO_ECHO, - /* 0x0ae */ OPT_UTF_8, - /* 0x0af */ OPT_NO_UTF_8, - /* 0x0b0 */ OPT_FORCE, - /* 0x0b1 */ OPT_REPAIR_MAGICS, - /* 0x0b2 */ OPT_TINY, - /* 0x0b3 */ OPT_OLD, - /* 0x0b4 */ OPT_STD, - /* 0x0b5 */ OPT_NEW, - /* 0x0b6 */ OPT_EXTRACT, - /* 0x0b7 */ OPT_NUMBER, - /* 0x0b8 */ OPT_SECTIONS, - /* 0x0b9 */ 0,0,0,0, 0,0,0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_SCALE, + /* 0x091 */ OPT_SHIFT, + /* 0x092 */ OPT_XSS, + /* 0x093 */ OPT_YSS, + /* 0x094 */ OPT_ZSS, + /* 0x095 */ OPT_ROT, + /* 0x096 */ OPT_XROT, + /* 0x097 */ OPT_YROT, + /* 0x098 */ OPT_ZROT, + /* 0x099 */ OPT_TRANSLATE, + /* 0x09a */ OPT_NULL, + /* 0x09b */ OPT_NEXT, + /* 0x09c */ OPT_ASCALE, + /* 0x09d */ OPT_AROT, + /* 0x09e */ OPT_TFORM_SCRIPT, + /* 0x09f */ OPT_KCL, + /* 0x0a0 */ OPT_KCL_FLAG, + /* 0x0a1 */ OPT_KCL_SCRIPT, + /* 0x0a2 */ OPT_TRI_AREA, + /* 0x0a3 */ OPT_TRI_HEIGHT, + /* 0x0a4 */ OPT_FLAG_FILE, + /* 0x0a5 */ OPT_XTRIDATA, + /* 0x0a6 */ OPT_SLOT, + /* 0x0a7 */ OPT_ID, + /* 0x0a8 */ OPT_BASE64, + /* 0x0a9 */ OPT_DB64, + /* 0x0aa */ OPT_CODING, + /* 0x0ab */ OPT_ROUND, + /* 0x0ac */ OPT_NO_WILDCARDS, + /* 0x0ad */ OPT_IN_ORDER, + /* 0x0ae */ OPT_NO_ECHO, + /* 0x0af */ OPT_UTF_8, + /* 0x0b0 */ OPT_NO_UTF_8, + /* 0x0b1 */ OPT_FORCE, + /* 0x0b2 */ OPT_REPAIR_MAGICS, + /* 0x0b3 */ OPT_TINY, + /* 0x0b4 */ OPT_OLD, + /* 0x0b5 */ OPT_STD, + /* 0x0b6 */ OPT_NEW, + /* 0x0b7 */ OPT_EXTRACT, + /* 0x0b8 */ OPT_NUMBER, + /* 0x0b9 */ OPT_SECTIONS, + /* 0x0ba */ 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, diff --git a/project/src/ui/ui-wkclt.h b/project/src/ui/ui-wkclt.h index e7caae7..3f8a2e9 100644 --- a/project/src/ui/ui-wkclt.h +++ b/project/src/ui/ui-wkclt.h @@ -107,6 +107,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -144,7 +145,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 83 + OPT__N_TOTAL // == 84 } enumOptions; @@ -475,6 +476,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wkmpt.c b/project/src/ui/ui-wkmpt.c index 1732e0f..f04bd3c 100644 --- a/project/src/ui/ui-wkmpt.c +++ b/project/src/ui/ui-wkmpt.c @@ -525,6 +525,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -921,7 +926,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 101 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 102 }; @@ -1214,6 +1219,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -1422,77 +1428,78 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x078 */ 0,0,0,0, 0,0,0,0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_SCALE, - /* 0x090 */ OPT_SHIFT, - /* 0x091 */ OPT_XSS, - /* 0x092 */ OPT_YSS, - /* 0x093 */ OPT_ZSS, - /* 0x094 */ OPT_ROT, - /* 0x095 */ OPT_XROT, - /* 0x096 */ OPT_YROT, - /* 0x097 */ OPT_ZROT, - /* 0x098 */ OPT_YPOS, - /* 0x099 */ OPT_TRANSLATE, - /* 0x09a */ OPT_NULL, - /* 0x09b */ OPT_NEXT, - /* 0x09c */ OPT_ASCALE, - /* 0x09d */ OPT_AROT, - /* 0x09e */ OPT_TFORM_SCRIPT, - /* 0x09f */ OPT_RM_GOBJ, - /* 0x0a0 */ OPT_BATTLE, - /* 0x0a1 */ OPT_EXPORT_FLAGS, - /* 0x0a2 */ OPT_ROUTE_OPTIONS, - /* 0x0a3 */ OPT_WIM0, - /* 0x0a4 */ OPT_SLOT, - /* 0x0a5 */ OPT_POS_MODE, - /* 0x0a6 */ OPT_POS_FILE, - /* 0x0a7 */ OPT_PNG, - /* 0x0a8 */ OPT_LOAD_KCL, - /* 0x0a9 */ OPT_KCL, - /* 0x0aa */ OPT_KCL_FLAG, - /* 0x0ab */ OPT_KCL_SCRIPT, - /* 0x0ac */ OPT_TRI_AREA, - /* 0x0ad */ OPT_TRI_HEIGHT, - /* 0x0ae */ OPT_FLAG_FILE, - /* 0x0af */ OPT_XTRIDATA, - /* 0x0b0 */ OPT_KMP, - /* 0x0b1 */ OPT_N_LAPS, - /* 0x0b2 */ OPT_SPEED_MOD, - /* 0x0b3 */ OPT_KTPT2, - /* 0x0b4 */ OPT_TFORM_KMP, - /* 0x0b5 */ OPT_REPAIR_XPF, - /* 0x0b6 */ OPT_GAMEMODES, - /* 0x0b7 */ OPT_ROUND, - /* 0x0b8 */ OPT_NO_WILDCARDS, - /* 0x0b9 */ OPT_IN_ORDER, - /* 0x0ba */ OPT_EPSILON, - /* 0x0bb */ OPT_DIFF, - /* 0x0bc */ OPT_NO_ECHO, - /* 0x0bd */ OPT_UTF_8, - /* 0x0be */ OPT_NO_UTF_8, - /* 0x0bf */ OPT_FORCE, - /* 0x0c0 */ OPT_REPAIR_MAGICS, - /* 0x0c1 */ OPT_TINY, - /* 0x0c2 */ OPT_OLD, - /* 0x0c3 */ OPT_STD, - /* 0x0c4 */ OPT_NEW, - /* 0x0c5 */ OPT_EXTRACT, - /* 0x0c6 */ OPT_NUMBER, - /* 0x0c7 */ OPT_SECTIONS, - /* 0x0c8 */ 0,0,0,0, 0,0,0,0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_SCALE, + /* 0x091 */ OPT_SHIFT, + /* 0x092 */ OPT_XSS, + /* 0x093 */ OPT_YSS, + /* 0x094 */ OPT_ZSS, + /* 0x095 */ OPT_ROT, + /* 0x096 */ OPT_XROT, + /* 0x097 */ OPT_YROT, + /* 0x098 */ OPT_ZROT, + /* 0x099 */ OPT_YPOS, + /* 0x09a */ OPT_TRANSLATE, + /* 0x09b */ OPT_NULL, + /* 0x09c */ OPT_NEXT, + /* 0x09d */ OPT_ASCALE, + /* 0x09e */ OPT_AROT, + /* 0x09f */ OPT_TFORM_SCRIPT, + /* 0x0a0 */ OPT_RM_GOBJ, + /* 0x0a1 */ OPT_BATTLE, + /* 0x0a2 */ OPT_EXPORT_FLAGS, + /* 0x0a3 */ OPT_ROUTE_OPTIONS, + /* 0x0a4 */ OPT_WIM0, + /* 0x0a5 */ OPT_SLOT, + /* 0x0a6 */ OPT_POS_MODE, + /* 0x0a7 */ OPT_POS_FILE, + /* 0x0a8 */ OPT_PNG, + /* 0x0a9 */ OPT_LOAD_KCL, + /* 0x0aa */ OPT_KCL, + /* 0x0ab */ OPT_KCL_FLAG, + /* 0x0ac */ OPT_KCL_SCRIPT, + /* 0x0ad */ OPT_TRI_AREA, + /* 0x0ae */ OPT_TRI_HEIGHT, + /* 0x0af */ OPT_FLAG_FILE, + /* 0x0b0 */ OPT_XTRIDATA, + /* 0x0b1 */ OPT_KMP, + /* 0x0b2 */ OPT_N_LAPS, + /* 0x0b3 */ OPT_SPEED_MOD, + /* 0x0b4 */ OPT_KTPT2, + /* 0x0b5 */ OPT_TFORM_KMP, + /* 0x0b6 */ OPT_REPAIR_XPF, + /* 0x0b7 */ OPT_GAMEMODES, + /* 0x0b8 */ OPT_ROUND, + /* 0x0b9 */ OPT_NO_WILDCARDS, + /* 0x0ba */ OPT_IN_ORDER, + /* 0x0bb */ OPT_EPSILON, + /* 0x0bc */ OPT_DIFF, + /* 0x0bd */ OPT_NO_ECHO, + /* 0x0be */ OPT_UTF_8, + /* 0x0bf */ OPT_NO_UTF_8, + /* 0x0c0 */ OPT_FORCE, + /* 0x0c1 */ OPT_REPAIR_MAGICS, + /* 0x0c2 */ OPT_TINY, + /* 0x0c3 */ OPT_OLD, + /* 0x0c4 */ OPT_STD, + /* 0x0c5 */ OPT_NEW, + /* 0x0c6 */ OPT_EXTRACT, + /* 0x0c7 */ OPT_NUMBER, + /* 0x0c8 */ OPT_SECTIONS, + /* 0x0c9 */ 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, diff --git a/project/src/ui/ui-wkmpt.h b/project/src/ui/ui-wkmpt.h index b5c0e5e..d0ac366 100644 --- a/project/src/ui/ui-wkmpt.h +++ b/project/src/ui/ui-wkmpt.h @@ -115,6 +115,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -162,7 +163,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 101 + OPT__N_TOTAL // == 102 } enumOptions; @@ -493,6 +494,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wlect.c b/project/src/ui/ui-wlect.c index 29f4faf..c265634 100644 --- a/project/src/ui/ui-wlect.c +++ b/project/src/ui/ui-wlect.c @@ -427,6 +427,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -707,7 +712,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 92 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 93 }; @@ -889,6 +894,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -1091,72 +1097,73 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_LOAD_PREFIX, - /* 0x08f */ OPT_LOAD_CATEGORY, - /* 0x090 */ OPT_PLUS, - /* 0x091 */ OPT_CHDIR, - /* 0x092 */ OPT_ROUND, - /* 0x093 */ OPT_NO_WILDCARDS, - /* 0x094 */ OPT_IN_ORDER, - /* 0x095 */ OPT_NO_ECHO, - /* 0x096 */ OPT_UTF_8, - /* 0x097 */ OPT_NO_UTF_8, - /* 0x098 */ OPT_CACHE, - /* 0x099 */ OPT_LOG_CACHE, - /* 0x09a */ OPT_LT_CLEAR, - /* 0x09b */ OPT_LT_ONLINE, - /* 0x09c */ OPT_LT_N_PLAYERS, - /* 0x09d */ OPT_LT_COND_BIT, - /* 0x09e */ OPT_LT_GAME_MODE, - /* 0x09f */ OPT_LT_ENGINE, - /* 0x0a0 */ OPT_LT_RANDOM, - /* 0x0a1 */ OPT_LEX_PURGE, - /* 0x0a2 */ OPT_LEX_RM_FEAT, - /* 0x0a3 */ OPT_FORCE, - /* 0x0a4 */ OPT_REPAIR_MAGICS, - /* 0x0a5 */ OPT_CREATE_DISTRIB, - /* 0x0a6 */ OPT_OLD, - /* 0x0a7 */ OPT_STD, - /* 0x0a8 */ OPT_NEW, - /* 0x0a9 */ OPT_EXTRACT, - /* 0x0aa */ OPT_LE_DEFINE, - /* 0x0ab */ OPT_LE_ARENA, - /* 0x0ac */ OPT_LPAR, - /* 0x0ad */ OPT_ALIAS, - /* 0x0ae */ OPT_ENGINE, - /* 0x0af */ OPT_200CC, - /* 0x0b0 */ OPT_PERFMON, - /* 0x0b1 */ OPT_CUSTOM_TT, - /* 0x0b2 */ OPT_XPFLAGS, - /* 0x0b3 */ OPT_SPEEDOMETER, - /* 0x0b4 */ OPT_DEBUG, - /* 0x0b5 */ OPT_TRACK_DIR, - /* 0x0b6 */ OPT_COPY_TRACKS, - /* 0x0b7 */ OPT_MOVE_TRACKS, - /* 0x0b8 */ OPT_MOVE1_TRACKS, - /* 0x0b9 */ OPT_LINK_TRACKS, - /* 0x0ba */ OPT_SZS_MODE, - /* 0x0bb */ OPT_LOAD_BMG, - /* 0x0bc */ OPT_PATCH_BMG, - /* 0x0bd */ OPT_MACRO_BMG, - /* 0x0be */ OPT_PATCH_NAMES, - /* 0x0bf */ OPT_ORDER_BY, - /* 0x0c0 */ OPT_ORDER_ALL, - /* 0x0c1 */ OPT_NUMBER, - /* 0x0c2 */ OPT_SECTIONS, - /* 0x0c3 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_LOAD_PREFIX, + /* 0x090 */ OPT_LOAD_CATEGORY, + /* 0x091 */ OPT_PLUS, + /* 0x092 */ OPT_CHDIR, + /* 0x093 */ OPT_ROUND, + /* 0x094 */ OPT_NO_WILDCARDS, + /* 0x095 */ OPT_IN_ORDER, + /* 0x096 */ OPT_NO_ECHO, + /* 0x097 */ OPT_UTF_8, + /* 0x098 */ OPT_NO_UTF_8, + /* 0x099 */ OPT_CACHE, + /* 0x09a */ OPT_LOG_CACHE, + /* 0x09b */ OPT_LT_CLEAR, + /* 0x09c */ OPT_LT_ONLINE, + /* 0x09d */ OPT_LT_N_PLAYERS, + /* 0x09e */ OPT_LT_COND_BIT, + /* 0x09f */ OPT_LT_GAME_MODE, + /* 0x0a0 */ OPT_LT_ENGINE, + /* 0x0a1 */ OPT_LT_RANDOM, + /* 0x0a2 */ OPT_LEX_PURGE, + /* 0x0a3 */ OPT_LEX_RM_FEAT, + /* 0x0a4 */ OPT_FORCE, + /* 0x0a5 */ OPT_REPAIR_MAGICS, + /* 0x0a6 */ OPT_CREATE_DISTRIB, + /* 0x0a7 */ OPT_OLD, + /* 0x0a8 */ OPT_STD, + /* 0x0a9 */ OPT_NEW, + /* 0x0aa */ OPT_EXTRACT, + /* 0x0ab */ OPT_LE_DEFINE, + /* 0x0ac */ OPT_LE_ARENA, + /* 0x0ad */ OPT_LPAR, + /* 0x0ae */ OPT_ALIAS, + /* 0x0af */ OPT_ENGINE, + /* 0x0b0 */ OPT_200CC, + /* 0x0b1 */ OPT_PERFMON, + /* 0x0b2 */ OPT_CUSTOM_TT, + /* 0x0b3 */ OPT_XPFLAGS, + /* 0x0b4 */ OPT_SPEEDOMETER, + /* 0x0b5 */ OPT_DEBUG, + /* 0x0b6 */ OPT_TRACK_DIR, + /* 0x0b7 */ OPT_COPY_TRACKS, + /* 0x0b8 */ OPT_MOVE_TRACKS, + /* 0x0b9 */ OPT_MOVE1_TRACKS, + /* 0x0ba */ OPT_LINK_TRACKS, + /* 0x0bb */ OPT_SZS_MODE, + /* 0x0bc */ OPT_LOAD_BMG, + /* 0x0bd */ OPT_PATCH_BMG, + /* 0x0be */ OPT_MACRO_BMG, + /* 0x0bf */ OPT_PATCH_NAMES, + /* 0x0c0 */ OPT_ORDER_BY, + /* 0x0c1 */ OPT_ORDER_ALL, + /* 0x0c2 */ OPT_NUMBER, + /* 0x0c3 */ OPT_SECTIONS, + /* 0x0c4 */ 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, diff --git a/project/src/ui/ui-wlect.h b/project/src/ui/ui-wlect.h index 5c46558..dfad948 100644 --- a/project/src/ui/ui-wlect.h +++ b/project/src/ui/ui-wlect.h @@ -113,6 +113,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -153,7 +154,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 92 + OPT__N_TOTAL // == 93 } enumOptions; @@ -464,6 +465,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wmdlt.c b/project/src/ui/ui-wmdlt.c index e2361c8..a3e2c36 100644 --- a/project/src/ui/ui-wmdlt.c +++ b/project/src/ui/ui-wmdlt.c @@ -355,6 +355,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -609,7 +614,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 72 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 73 }; @@ -775,6 +780,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -927,51 +933,52 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_MDL, - /* 0x090 */ OPT_SCALE, - /* 0x091 */ OPT_SHIFT, - /* 0x092 */ OPT_XSS, - /* 0x093 */ OPT_YSS, - /* 0x094 */ OPT_ZSS, - /* 0x095 */ OPT_ROT, - /* 0x096 */ OPT_XROT, - /* 0x097 */ OPT_YROT, - /* 0x098 */ OPT_ZROT, - /* 0x099 */ OPT_TRANSLATE, - /* 0x09a */ OPT_NULL, - /* 0x09b */ OPT_NEXT, - /* 0x09c */ OPT_ASCALE, - /* 0x09d */ OPT_AROT, - /* 0x09e */ OPT_TFORM_SCRIPT, - /* 0x09f */ OPT_ROUND, - /* 0x0a0 */ OPT_NO_WILDCARDS, - /* 0x0a1 */ OPT_IN_ORDER, - /* 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, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_MDL, + /* 0x091 */ OPT_SCALE, + /* 0x092 */ OPT_SHIFT, + /* 0x093 */ OPT_XSS, + /* 0x094 */ OPT_YSS, + /* 0x095 */ OPT_ZSS, + /* 0x096 */ OPT_ROT, + /* 0x097 */ OPT_XROT, + /* 0x098 */ OPT_YROT, + /* 0x099 */ OPT_ZROT, + /* 0x09a */ OPT_TRANSLATE, + /* 0x09b */ OPT_NULL, + /* 0x09c */ OPT_NEXT, + /* 0x09d */ OPT_ASCALE, + /* 0x09e */ OPT_AROT, + /* 0x09f */ OPT_TFORM_SCRIPT, + /* 0x0a0 */ OPT_ROUND, + /* 0x0a1 */ OPT_NO_WILDCARDS, + /* 0x0a2 */ OPT_IN_ORDER, + /* 0x0a3 */ OPT_NO_ECHO, + /* 0x0a4 */ OPT_UTF_8, + /* 0x0a5 */ OPT_NO_UTF_8, + /* 0x0a6 */ OPT_FORCE, + /* 0x0a7 */ OPT_REPAIR_MAGICS, + /* 0x0a8 */ OPT_TINY, + /* 0x0a9 */ OPT_OLD, + /* 0x0aa */ OPT_STD, + /* 0x0ab */ OPT_NEW, + /* 0x0ac */ OPT_EXTRACT, + /* 0x0ad */ OPT_NUMBER, + /* 0x0ae */ OPT_SECTIONS, + /* 0x0af */ 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, diff --git a/project/src/ui/ui-wmdlt.h b/project/src/ui/ui-wmdlt.h index 28e7af6..e6d46bd 100644 --- a/project/src/ui/ui-wmdlt.h +++ b/project/src/ui/ui-wmdlt.h @@ -99,6 +99,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -133,7 +134,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 72 + OPT__N_TOTAL // == 73 } enumOptions; @@ -387,6 +388,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wpatt.c b/project/src/ui/ui-wpatt.c index a7f0f69..07ce14d 100644 --- a/project/src/ui/ui-wpatt.c +++ b/project/src/ui/ui-wpatt.c @@ -197,6 +197,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -440,7 +445,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 56 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 57 }; @@ -572,6 +577,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -706,35 +712,36 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_ROUND, - /* 0x090 */ OPT_NO_WILDCARDS, - /* 0x091 */ OPT_IN_ORDER, - /* 0x092 */ OPT_NO_ECHO, - /* 0x093 */ OPT_PAT, - /* 0x094 */ OPT_UTF_8, - /* 0x095 */ OPT_NO_UTF_8, - /* 0x096 */ OPT_FORCE, - /* 0x097 */ OPT_REPAIR_MAGICS, - /* 0x098 */ OPT_OLD, - /* 0x099 */ OPT_STD, - /* 0x09a */ OPT_NEW, - /* 0x09b */ OPT_EXTRACT, - /* 0x09c */ OPT_NUMBER, - /* 0x09d */ OPT_SECTIONS, - /* 0x09e */ 0,0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_ROUND, + /* 0x091 */ OPT_NO_WILDCARDS, + /* 0x092 */ OPT_IN_ORDER, + /* 0x093 */ OPT_NO_ECHO, + /* 0x094 */ OPT_PAT, + /* 0x095 */ OPT_UTF_8, + /* 0x096 */ OPT_NO_UTF_8, + /* 0x097 */ OPT_FORCE, + /* 0x098 */ OPT_REPAIR_MAGICS, + /* 0x099 */ OPT_OLD, + /* 0x09a */ OPT_STD, + /* 0x09b */ OPT_NEW, + /* 0x09c */ OPT_EXTRACT, + /* 0x09d */ OPT_NUMBER, + /* 0x09e */ OPT_SECTIONS, + /* 0x09f */ 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, diff --git a/project/src/ui/ui-wpatt.h b/project/src/ui/ui-wpatt.h index ca89e6b..ad0847b 100644 --- a/project/src/ui/ui-wpatt.h +++ b/project/src/ui/ui-wpatt.h @@ -84,6 +84,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -117,7 +118,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 56 + OPT__N_TOTAL // == 57 } enumOptions; @@ -304,6 +305,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wstrt.c b/project/src/ui/ui-wstrt.c index 2d6cd05..d7a4c55 100644 --- a/project/src/ui/ui-wstrt.c +++ b/project/src/ui/ui-wstrt.c @@ -552,6 +552,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = "" }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -944,7 +949,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " directory." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 126 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 127 }; @@ -1164,6 +1169,7 @@ static const struct option OptionLong[] = { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, { "@", 0, 0, '@' }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -1401,104 +1407,105 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x077 */ 0,0,0,0, 0,0,0,0, 0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_CHDIR, - /* 0x08f */ OPT_NO_WILDCARDS, - /* 0x090 */ OPT_IN_ORDER, - /* 0x091 */ OPT_VS_REGION, - /* 0x092 */ OPT_BT_REGION, - /* 0x093 */ OPT_ALL_RANKS, - /* 0x094 */ OPT_POINTS, - /* 0x095 */ OPT_CHEAT, - /* 0x096 */ OPT_HTTPS, - /* 0x097 */ OPT_DOMAIN, - /* 0x098 */ OPT_WIIMMFI, - /* 0x099 */ OPT_TWIIMMFI, - /* 0x09a */ OPT_WC24, - /* 0x09b */ OPT_WCODE, - /* 0x09c */ OPT_ADD_WCODE, - /* 0x09d */ OPT_PB_MODE, - /* 0x09e */ OPT_PATCHED_BY, - /* 0x09f */ OPT_VS, - /* 0x0a0 */ OPT_VS2, - /* 0x0a1 */ OPT_BT, - /* 0x0a2 */ OPT_BT2, - /* 0x0a3 */ OPT_CANNON, - /* 0x0a4 */ OPT_MENO, - /* 0x0a5 */ OPT_UTF_8, - /* 0x0a6 */ OPT_NO_UTF_8, - /* 0x0a7 */ OPT_FORCE, - /* 0x0a8 */ OPT_REPAIR_MAGICS, - /* 0x0a9 */ OPT_OLD, - /* 0x0aa */ OPT_STD, - /* 0x0ab */ OPT_NEW, - /* 0x0ac */ OPT_EXTRACT, - /* 0x0ad */ OPT_NUMBER, - /* 0x0ae */ OPT_CLEAN_DOL, - /* 0x0af */ OPT_ADD_LECODE, - /* 0x0b0 */ OPT_ADDS_LECODE, - /* 0x0b1 */ OPT_ADD_OLD_LECODE, - /* 0x0b2 */ OPT_ADD_CTCODE, - /* 0x0b3 */ OPT_CT_DIR, - /* 0x0b4 */ OPT_MOVE_D8, - /* 0x0b5 */ OPT_ADD_SECTION, - /* 0x0b6 */ OPT_FULL_GCH, - /* 0x0b7 */ OPT_GCT_NO_SEP, - /* 0x0b8 */ OPT_GCT_SEP, - /* 0x0b9 */ OPT_GCT_ASM_SEP, - /* 0x0ba */ OPT_GCT_LIST, - /* 0x0bb */ OPT_GCT_MOVE, - /* 0x0bc */ OPT_GCT_ADDR, - /* 0x0bd */ OPT_GCT_SPACE, - /* 0x0be */ OPT_ALLOW_USER_GCH, - /* 0x0bf */ OPT_CREATE_SECT, - /* 0x0c0 */ OPT_WPF, - /* 0x0c1 */ OPT_SECTIONS, - /* 0x0c2 */ OPT_PORT_DB, - /* 0x0c3 */ OPT_ORDER, - /* 0x0c4 */ OPT_VADDR, - /* 0x0c5 */ OPT_FADDR, - /* 0x0c6 */ OPT_SNAME, - /* 0x0c7 */ OPT_INT1, - /* 0x0c8 */ OPT_INT2, - /* 0x0c9 */ OPT_INT3, - /* 0x0ca */ OPT_INT4, - /* 0x0cb */ OPT_INT5, - /* 0x0cc */ OPT_INT6, - /* 0x0cd */ OPT_INT7, - /* 0x0ce */ OPT_INT8, - /* 0x0cf */ OPT_FLOAT, - /* 0x0d0 */ OPT_DOUBLE, - /* 0x0d1 */ OPT_LE, - /* 0x0d2 */ OPT_BE, - /* 0x0d3 */ OPT_ZEROS, - /* 0x0d4 */ OPT_HEX, - /* 0x0d5 */ OPT_DEC, - /* 0x0d6 */ OPT_C_SYNTAX, - /* 0x0d7 */ OPT_ADDR, - /* 0x0d8 */ OPT_ALIGN, - /* 0x0d9 */ OPT_TRIGGER, - /* 0x0da */ OPT_NO_ADDR, - /* 0x0db */ OPT_NO_NUMBERS, - /* 0x0dc */ OPT_NO_TEXT, - /* 0x0dd */ OPT_FORMAT, - /* 0x0de */ OPT_NO_NULL, - /* 0x0df */ OPT_NARROW, - /* 0x0e0 */ OPT_SMALL, - /* 0x0e1 */ OPT_WIDE, - /* 0x0e2 */ OPT_BYTES, - /* 0x0e3 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_CHDIR, + /* 0x090 */ OPT_NO_WILDCARDS, + /* 0x091 */ OPT_IN_ORDER, + /* 0x092 */ OPT_VS_REGION, + /* 0x093 */ OPT_BT_REGION, + /* 0x094 */ OPT_ALL_RANKS, + /* 0x095 */ OPT_POINTS, + /* 0x096 */ OPT_CHEAT, + /* 0x097 */ OPT_HTTPS, + /* 0x098 */ OPT_DOMAIN, + /* 0x099 */ OPT_WIIMMFI, + /* 0x09a */ OPT_TWIIMMFI, + /* 0x09b */ OPT_WC24, + /* 0x09c */ OPT_WCODE, + /* 0x09d */ OPT_ADD_WCODE, + /* 0x09e */ OPT_PB_MODE, + /* 0x09f */ OPT_PATCHED_BY, + /* 0x0a0 */ OPT_VS, + /* 0x0a1 */ OPT_VS2, + /* 0x0a2 */ OPT_BT, + /* 0x0a3 */ OPT_BT2, + /* 0x0a4 */ OPT_CANNON, + /* 0x0a5 */ OPT_MENO, + /* 0x0a6 */ OPT_UTF_8, + /* 0x0a7 */ OPT_NO_UTF_8, + /* 0x0a8 */ OPT_FORCE, + /* 0x0a9 */ OPT_REPAIR_MAGICS, + /* 0x0aa */ OPT_OLD, + /* 0x0ab */ OPT_STD, + /* 0x0ac */ OPT_NEW, + /* 0x0ad */ OPT_EXTRACT, + /* 0x0ae */ OPT_NUMBER, + /* 0x0af */ OPT_CLEAN_DOL, + /* 0x0b0 */ OPT_ADD_LECODE, + /* 0x0b1 */ OPT_ADDS_LECODE, + /* 0x0b2 */ OPT_ADD_OLD_LECODE, + /* 0x0b3 */ OPT_ADD_CTCODE, + /* 0x0b4 */ OPT_CT_DIR, + /* 0x0b5 */ OPT_MOVE_D8, + /* 0x0b6 */ OPT_ADD_SECTION, + /* 0x0b7 */ OPT_FULL_GCH, + /* 0x0b8 */ OPT_GCT_NO_SEP, + /* 0x0b9 */ OPT_GCT_SEP, + /* 0x0ba */ OPT_GCT_ASM_SEP, + /* 0x0bb */ OPT_GCT_LIST, + /* 0x0bc */ OPT_GCT_MOVE, + /* 0x0bd */ OPT_GCT_ADDR, + /* 0x0be */ OPT_GCT_SPACE, + /* 0x0bf */ OPT_ALLOW_USER_GCH, + /* 0x0c0 */ OPT_CREATE_SECT, + /* 0x0c1 */ OPT_WPF, + /* 0x0c2 */ OPT_SECTIONS, + /* 0x0c3 */ OPT_PORT_DB, + /* 0x0c4 */ OPT_ORDER, + /* 0x0c5 */ OPT_VADDR, + /* 0x0c6 */ OPT_FADDR, + /* 0x0c7 */ OPT_SNAME, + /* 0x0c8 */ OPT_INT1, + /* 0x0c9 */ OPT_INT2, + /* 0x0ca */ OPT_INT3, + /* 0x0cb */ OPT_INT4, + /* 0x0cc */ OPT_INT5, + /* 0x0cd */ OPT_INT6, + /* 0x0ce */ OPT_INT7, + /* 0x0cf */ OPT_INT8, + /* 0x0d0 */ OPT_FLOAT, + /* 0x0d1 */ OPT_DOUBLE, + /* 0x0d2 */ OPT_LE, + /* 0x0d3 */ OPT_BE, + /* 0x0d4 */ OPT_ZEROS, + /* 0x0d5 */ OPT_HEX, + /* 0x0d6 */ OPT_DEC, + /* 0x0d7 */ OPT_C_SYNTAX, + /* 0x0d8 */ OPT_ADDR, + /* 0x0d9 */ OPT_ALIGN, + /* 0x0da */ OPT_TRIGGER, + /* 0x0db */ OPT_NO_ADDR, + /* 0x0dc */ OPT_NO_NUMBERS, + /* 0x0dd */ OPT_NO_TEXT, + /* 0x0de */ OPT_FORMAT, + /* 0x0df */ OPT_NO_NULL, + /* 0x0e0 */ OPT_NARROW, + /* 0x0e1 */ OPT_SMALL, + /* 0x0e2 */ OPT_WIDE, + /* 0x0e3 */ OPT_BYTES, + /* 0x0e4 */ 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, diff --git a/project/src/ui/ui-wstrt.h b/project/src/ui/ui-wstrt.h index eacffa6..4ed5b83 100644 --- a/project/src/ui/ui-wstrt.h +++ b/project/src/ui/ui-wstrt.h @@ -135,6 +135,7 @@ typedef enum enumOptions OPT_XHELP, OPT_CONFIG, OPT_AT_DUMMY, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -187,7 +188,7 @@ typedef enum enumOptions OPT_CLEAN_DOL, OPT_CT_DIR, - OPT__N_TOTAL // == 126 + OPT__N_TOTAL // == 127 } enumOptions; @@ -520,6 +521,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/ui/ui-wszst.c b/project/src/ui/ui-wszst.c index 31d3913..06ed088 100644 --- a/project/src/ui/ui-wszst.c +++ b/project/src/ui/ui-wszst.c @@ -1261,6 +1261,11 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " more details." }, + { OPT_YDEBUG, false, true, false, false, false, 0, "ydebug", + 0, + " Enable Macros yBINGO and yTRACELINE." + }, + { OPT_ALLOW_ALL, false, false, false, false, false, 0, "allow-all", 0, "Usually commands accept only options with impact to the command. All" @@ -1946,7 +1951,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 237 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 238 }; @@ -2589,6 +2594,7 @@ static const struct option OptionLong[] = { "help", 0, 0, 'h' }, { "xhelp", 0, 0, GO_XHELP }, { "config", 1, 0, GO_CONFIG }, + { "ydebug", 0, 0, GO_YDEBUG }, { "allow-all", 0, 0, GO_ALLOW_ALL }, { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, @@ -3048,206 +3054,206 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x079 */ 0,0,0,0, 0,0,0, /* 0x080 */ OPT_XHELP, /* 0x081 */ OPT_CONFIG, - /* 0x082 */ OPT_ALLOW_ALL, - /* 0x083 */ OPT_COMPATIBLE, - /* 0x084 */ OPT_WIDTH, - /* 0x085 */ OPT_MAX_WIDTH, - /* 0x086 */ OPT_NO_PAGER, - /* 0x087 */ OPT_TIMING, - /* 0x088 */ OPT_DE, - /* 0x089 */ OPT_COLORS, - /* 0x08a */ OPT_NO_COLORS, - /* 0x08b */ OPT_CT_CODE, - /* 0x08c */ OPT_LE_CODE, - /* 0x08d */ OPT_LE_04X, - /* 0x08e */ OPT_LOAD_PREFIX, - /* 0x08f */ OPT_LOAD_CATEGORY, - /* 0x090 */ OPT_PLUS, - /* 0x091 */ OPT_SPLIT, - /* 0x092 */ OPT_PRINTF, - /* 0x093 */ OPT_CHDIR, - /* 0x094 */ OPT_TOUCH, - /* 0x095 */ OPT_AUTO, - /* 0x096 */ OPT_SET_FLAGS, - /* 0x097 */ OPT_SET_SCALE, - /* 0x098 */ OPT_SET_ROT, - /* 0x099 */ OPT_SET_X, - /* 0x09a */ OPT_SET_Y, - /* 0x09b */ OPT_SET_Z, - /* 0x09c */ OPT_XCENTER, - /* 0x09d */ OPT_YCENTER, - /* 0x09e */ OPT_ZCENTER, - /* 0x09f */ OPT_CENTER, - /* 0x0a0 */ OPT_SCALE, - /* 0x0a1 */ OPT_SHIFT, - /* 0x0a2 */ OPT_XSS, - /* 0x0a3 */ OPT_YSS, - /* 0x0a4 */ OPT_ZSS, - /* 0x0a5 */ OPT_ROT, - /* 0x0a6 */ OPT_XROT, - /* 0x0a7 */ OPT_YROT, - /* 0x0a8 */ OPT_ZROT, - /* 0x0a9 */ OPT_YPOS, - /* 0x0aa */ OPT_TRANSLATE, - /* 0x0ab */ OPT_NULL, - /* 0x0ac */ OPT_NEXT, - /* 0x0ad */ OPT_ASCALE, - /* 0x0ae */ OPT_AROT, - /* 0x0af */ OPT_TFORM_SCRIPT, - /* 0x0b0 */ OPT_MINIMAP, - /* 0x0b1 */ OPT_RM_GOBJ, - /* 0x0b2 */ OPT_BATTLE, - /* 0x0b3 */ OPT_EXPORT_FLAGS, - /* 0x0b4 */ OPT_ROUTE_OPTIONS, - /* 0x0b5 */ OPT_WIM0, - /* 0x0b6 */ OPT_SLOT, - /* 0x0b7 */ OPT_LOAD_KCL, - /* 0x0b8 */ OPT_KCL, - /* 0x0b9 */ OPT_KCL_FLAG, - /* 0x0ba */ OPT_KCL_SCRIPT, - /* 0x0bb */ OPT_TRI_AREA, - /* 0x0bc */ OPT_TRI_HEIGHT, - /* 0x0bd */ OPT_FLAG_FILE, - /* 0x0be */ OPT_XTRIDATA, - /* 0x0bf */ OPT_KMP, - /* 0x0c0 */ OPT_N_LAPS, - /* 0x0c1 */ OPT_SPEED_MOD, - /* 0x0c2 */ OPT_KTPT2, - /* 0x0c3 */ OPT_TFORM_KMP, - /* 0x0c4 */ OPT_REPAIR_XPF, - /* 0x0c5 */ OPT_GAMEMODES, - /* 0x0c6 */ OPT_MDL, - /* 0x0c7 */ OPT_PAT, - /* 0x0c8 */ OPT_PATCH_FILES, - /* 0x0c9 */ OPT_KMG_LIMIT, - /* 0x0ca */ OPT_KMG_COPY, - /* 0x0cb */ OPT_LT_CLEAR, - /* 0x0cc */ OPT_LT_ONLINE, - /* 0x0cd */ OPT_LT_N_PLAYERS, - /* 0x0ce */ OPT_LT_COND_BIT, - /* 0x0cf */ OPT_LT_GAME_MODE, - /* 0x0d0 */ OPT_LT_ENGINE, - /* 0x0d1 */ OPT_LT_RANDOM, - /* 0x0d2 */ OPT_LEX_PURGE, - /* 0x0d3 */ OPT_LEX_FEATURES, - /* 0x0d4 */ OPT_LEX_RM_FEAT, - /* 0x0d5 */ OPT_LOAD_BMG, - /* 0x0d6 */ OPT_PATCH_BMG, - /* 0x0d7 */ OPT_MACRO_BMG, - /* 0x0d8 */ OPT_FILTER_BMG, - /* 0x0d9 */ OPT_LE_MENU, - /* 0x0da */ OPT_9LAPS, - /* 0x0db */ OPT_UI_SOURCE, - /* 0x0dc */ OPT_TITLE_SCREEN, - /* 0x0dd */ OPT_CUP_ICONS, - /* 0x0de */ OPT_NO_COPY, - /* 0x0df */ OPT_CACHE, - /* 0x0e0 */ OPT_CNAME, - /* 0x0e1 */ OPT_LOG_CACHE, - /* 0x0e2 */ OPT_PARALLEL, - /* 0x0e3 */ OPT_ID, - /* 0x0e4 */ OPT_BASE64, - /* 0x0e5 */ OPT_DB64, - /* 0x0e6 */ OPT_CODING, - /* 0x0e7 */ OPT_VERIFY, - /* 0x0e8 */ OPT_ROUND, - /* 0x0e9 */ OPT_NO_WILDCARDS, - /* 0x0ea */ OPT_IN_ORDER, - /* 0x0eb */ OPT_PIPE, - /* 0x0ec */ OPT_DELTA, - /* 0x0ed */ OPT_DIFF, - /* 0x0ee */ OPT_EPSILON, - /* 0x0ef */ OPT_BMG_ENDIAN, - /* 0x0f0 */ OPT_BMG_ENCODING, - /* 0x0f1 */ OPT_BMG_INF_SIZE, - /* 0x0f2 */ OPT_BMG_MID, - /* 0x0f3 */ OPT_FORCE_ATTRIB, - /* 0x0f4 */ OPT_DEF_ATTRIB, - /* 0x0f5 */ OPT_NO_ATTRIB, - /* 0x0f6 */ OPT_X_ESCAPES, - /* 0x0f7 */ OPT_OLD_ESCAPES, - /* 0x0f8 */ OPT_NO_BMG_COLORS, - /* 0x0f9 */ OPT_BMG_COLORS, - /* 0x0fa */ OPT_NO_BMG_INLINE, - /* 0x0fb */ OPT_AUTOADD_PATH, - /* 0x0fc */ OPT_STRIP, - /* 0x0fd */ OPT_UTF_8, - /* 0x0fe */ OPT_NO_UTF_8, - /* 0x0ff */ OPT_FORCE, - /* 0x100 */ OPT_REPAIR_MAGICS, - /* 0x101 */ OPT_TINY, - /* 0x102 */ OPT_YAZ0, - /* 0x103 */ OPT_YAZ1, - /* 0x104 */ OPT_XYZ, - /* 0x105 */ OPT_BZ, - /* 0x106 */ OPT_BZIP2, - /* 0x107 */ OPT_LZ, - /* 0x108 */ OPT_LZMA, - /* 0x109 */ OPT_SH, - /* 0x10a */ OPT_BASH, - /* 0x10b */ OPT_JSON, - /* 0x10c */ OPT_PHP, - /* 0x10d */ OPT_MAKEDOC, - /* 0x10e */ OPT_VAR, - /* 0x10f */ OPT_ARRAY, - /* 0x110 */ OPT_AVAR, - /* 0x111 */ OPT_CASE, - /* 0x112 */ OPT_FMODES, - /* 0x113 */ OPT_INSTALL, - /* 0x114 */ OPT_ANALYZE, - /* 0x115 */ OPT_ANALYZE_MODE, - /* 0x116 */ OPT_OLD, - /* 0x117 */ OPT_STD, - /* 0x118 */ OPT_NEW, - /* 0x119 */ OPT_EXTRACT, - /* 0x11a */ OPT_ID_LIST, - /* 0x11b */ OPT_REFERENCE, - /* 0x11c */ OPT_NUMBER, - /* 0x11d */ OPT_REMOVE_SRC, - /* 0x11e */ OPT_IGNORE_SETUP, - /* 0x11f */ OPT_PURGE, - /* 0x120 */ OPT_ALIGN_U8, - /* 0x121 */ OPT_ALIGN_LTA, - /* 0x122 */ OPT_ALIGN_PACK, - /* 0x123 */ OPT_ALIGN_BRRES, - /* 0x124 */ OPT_ALIGN_BREFF, - /* 0x125 */ OPT_ALIGN_BREFT, - /* 0x126 */ OPT_ALIGN, - /* 0x127 */ OPT_ENCODE_ALL, - /* 0x128 */ OPT_ENCODE_IMG, - /* 0x129 */ OPT_NO_ENCODE, - /* 0x12a */ OPT_NO_RECURSE, - /* 0x12b */ OPT_AUTO_ADD, - /* 0x12c */ OPT_NO_ECHO, - /* 0x12d */ OPT_PT_DIR, - /* 0x12e */ OPT_RM_AIPARAM, - /* 0x12f */ OPT_U8, - /* 0x130 */ OPT_SZS, - /* 0x131 */ OPT_WU8, - /* 0x132 */ OPT_XWU8, - /* 0x133 */ OPT_WBZ, - /* 0x134 */ OPT_WLZ, - /* 0x135 */ OPT_LFL, - /* 0x136 */ OPT_PACK, - /* 0x137 */ OPT_BRRES, - /* 0x138 */ OPT_BREFF, - /* 0x139 */ OPT_BREFT, - /* 0x13a */ OPT_NO_COMPRESS, - /* 0x13b */ OPT_FAST, - /* 0x13c */ OPT_LINKS, - /* 0x13d */ OPT_BASEDIR, - /* 0x13e */ OPT_DECODE, - /* 0x13f */ OPT_MIPMAPS, - /* 0x140 */ OPT_NO_MIPMAPS, - /* 0x141 */ OPT_N_MIPMAPS, - /* 0x142 */ OPT_MAX_MIPMAPS, - /* 0x143 */ OPT_MIPMAP_SIZE, - /* 0x144 */ OPT_FAST_MIPMAPS, - /* 0x145 */ OPT_CMPR_DEFAULT, - /* 0x146 */ OPT_CUT, - /* 0x147 */ OPT_RAW, - /* 0x148 */ OPT_SECTIONS, - /* 0x149 */ 0, + /* 0x082 */ OPT_YDEBUG, + /* 0x083 */ OPT_ALLOW_ALL, + /* 0x084 */ OPT_COMPATIBLE, + /* 0x085 */ OPT_WIDTH, + /* 0x086 */ OPT_MAX_WIDTH, + /* 0x087 */ OPT_NO_PAGER, + /* 0x088 */ OPT_TIMING, + /* 0x089 */ OPT_DE, + /* 0x08a */ OPT_COLORS, + /* 0x08b */ OPT_NO_COLORS, + /* 0x08c */ OPT_CT_CODE, + /* 0x08d */ OPT_LE_CODE, + /* 0x08e */ OPT_LE_04X, + /* 0x08f */ OPT_LOAD_PREFIX, + /* 0x090 */ OPT_LOAD_CATEGORY, + /* 0x091 */ OPT_PLUS, + /* 0x092 */ OPT_SPLIT, + /* 0x093 */ OPT_PRINTF, + /* 0x094 */ OPT_CHDIR, + /* 0x095 */ OPT_TOUCH, + /* 0x096 */ OPT_AUTO, + /* 0x097 */ OPT_SET_FLAGS, + /* 0x098 */ OPT_SET_SCALE, + /* 0x099 */ OPT_SET_ROT, + /* 0x09a */ OPT_SET_X, + /* 0x09b */ OPT_SET_Y, + /* 0x09c */ OPT_SET_Z, + /* 0x09d */ OPT_XCENTER, + /* 0x09e */ OPT_YCENTER, + /* 0x09f */ OPT_ZCENTER, + /* 0x0a0 */ OPT_CENTER, + /* 0x0a1 */ OPT_SCALE, + /* 0x0a2 */ OPT_SHIFT, + /* 0x0a3 */ OPT_XSS, + /* 0x0a4 */ OPT_YSS, + /* 0x0a5 */ OPT_ZSS, + /* 0x0a6 */ OPT_ROT, + /* 0x0a7 */ OPT_XROT, + /* 0x0a8 */ OPT_YROT, + /* 0x0a9 */ OPT_ZROT, + /* 0x0aa */ OPT_YPOS, + /* 0x0ab */ OPT_TRANSLATE, + /* 0x0ac */ OPT_NULL, + /* 0x0ad */ OPT_NEXT, + /* 0x0ae */ OPT_ASCALE, + /* 0x0af */ OPT_AROT, + /* 0x0b0 */ OPT_TFORM_SCRIPT, + /* 0x0b1 */ OPT_MINIMAP, + /* 0x0b2 */ OPT_RM_GOBJ, + /* 0x0b3 */ OPT_BATTLE, + /* 0x0b4 */ OPT_EXPORT_FLAGS, + /* 0x0b5 */ OPT_ROUTE_OPTIONS, + /* 0x0b6 */ OPT_WIM0, + /* 0x0b7 */ OPT_SLOT, + /* 0x0b8 */ OPT_LOAD_KCL, + /* 0x0b9 */ OPT_KCL, + /* 0x0ba */ OPT_KCL_FLAG, + /* 0x0bb */ OPT_KCL_SCRIPT, + /* 0x0bc */ OPT_TRI_AREA, + /* 0x0bd */ OPT_TRI_HEIGHT, + /* 0x0be */ OPT_FLAG_FILE, + /* 0x0bf */ OPT_XTRIDATA, + /* 0x0c0 */ OPT_KMP, + /* 0x0c1 */ OPT_N_LAPS, + /* 0x0c2 */ OPT_SPEED_MOD, + /* 0x0c3 */ OPT_KTPT2, + /* 0x0c4 */ OPT_TFORM_KMP, + /* 0x0c5 */ OPT_REPAIR_XPF, + /* 0x0c6 */ OPT_GAMEMODES, + /* 0x0c7 */ OPT_MDL, + /* 0x0c8 */ OPT_PAT, + /* 0x0c9 */ OPT_PATCH_FILES, + /* 0x0ca */ OPT_KMG_LIMIT, + /* 0x0cb */ OPT_KMG_COPY, + /* 0x0cc */ OPT_LT_CLEAR, + /* 0x0cd */ OPT_LT_ONLINE, + /* 0x0ce */ OPT_LT_N_PLAYERS, + /* 0x0cf */ OPT_LT_COND_BIT, + /* 0x0d0 */ OPT_LT_GAME_MODE, + /* 0x0d1 */ OPT_LT_ENGINE, + /* 0x0d2 */ OPT_LT_RANDOM, + /* 0x0d3 */ OPT_LEX_PURGE, + /* 0x0d4 */ OPT_LEX_FEATURES, + /* 0x0d5 */ OPT_LEX_RM_FEAT, + /* 0x0d6 */ OPT_LOAD_BMG, + /* 0x0d7 */ OPT_PATCH_BMG, + /* 0x0d8 */ OPT_MACRO_BMG, + /* 0x0d9 */ OPT_FILTER_BMG, + /* 0x0da */ OPT_LE_MENU, + /* 0x0db */ OPT_9LAPS, + /* 0x0dc */ OPT_UI_SOURCE, + /* 0x0dd */ OPT_TITLE_SCREEN, + /* 0x0de */ OPT_CUP_ICONS, + /* 0x0df */ OPT_NO_COPY, + /* 0x0e0 */ OPT_CACHE, + /* 0x0e1 */ OPT_CNAME, + /* 0x0e2 */ OPT_LOG_CACHE, + /* 0x0e3 */ OPT_PARALLEL, + /* 0x0e4 */ OPT_ID, + /* 0x0e5 */ OPT_BASE64, + /* 0x0e6 */ OPT_DB64, + /* 0x0e7 */ OPT_CODING, + /* 0x0e8 */ OPT_VERIFY, + /* 0x0e9 */ OPT_ROUND, + /* 0x0ea */ OPT_NO_WILDCARDS, + /* 0x0eb */ OPT_IN_ORDER, + /* 0x0ec */ OPT_PIPE, + /* 0x0ed */ OPT_DELTA, + /* 0x0ee */ OPT_DIFF, + /* 0x0ef */ OPT_EPSILON, + /* 0x0f0 */ OPT_BMG_ENDIAN, + /* 0x0f1 */ OPT_BMG_ENCODING, + /* 0x0f2 */ OPT_BMG_INF_SIZE, + /* 0x0f3 */ OPT_BMG_MID, + /* 0x0f4 */ OPT_FORCE_ATTRIB, + /* 0x0f5 */ OPT_DEF_ATTRIB, + /* 0x0f6 */ OPT_NO_ATTRIB, + /* 0x0f7 */ OPT_X_ESCAPES, + /* 0x0f8 */ OPT_OLD_ESCAPES, + /* 0x0f9 */ OPT_NO_BMG_COLORS, + /* 0x0fa */ OPT_BMG_COLORS, + /* 0x0fb */ OPT_NO_BMG_INLINE, + /* 0x0fc */ OPT_AUTOADD_PATH, + /* 0x0fd */ OPT_STRIP, + /* 0x0fe */ OPT_UTF_8, + /* 0x0ff */ OPT_NO_UTF_8, + /* 0x100 */ OPT_FORCE, + /* 0x101 */ OPT_REPAIR_MAGICS, + /* 0x102 */ OPT_TINY, + /* 0x103 */ OPT_YAZ0, + /* 0x104 */ OPT_YAZ1, + /* 0x105 */ OPT_XYZ, + /* 0x106 */ OPT_BZ, + /* 0x107 */ OPT_BZIP2, + /* 0x108 */ OPT_LZ, + /* 0x109 */ OPT_LZMA, + /* 0x10a */ OPT_SH, + /* 0x10b */ OPT_BASH, + /* 0x10c */ OPT_JSON, + /* 0x10d */ OPT_PHP, + /* 0x10e */ OPT_MAKEDOC, + /* 0x10f */ OPT_VAR, + /* 0x110 */ OPT_ARRAY, + /* 0x111 */ OPT_AVAR, + /* 0x112 */ OPT_CASE, + /* 0x113 */ OPT_FMODES, + /* 0x114 */ OPT_INSTALL, + /* 0x115 */ OPT_ANALYZE, + /* 0x116 */ OPT_ANALYZE_MODE, + /* 0x117 */ OPT_OLD, + /* 0x118 */ OPT_STD, + /* 0x119 */ OPT_NEW, + /* 0x11a */ OPT_EXTRACT, + /* 0x11b */ OPT_ID_LIST, + /* 0x11c */ OPT_REFERENCE, + /* 0x11d */ OPT_NUMBER, + /* 0x11e */ OPT_REMOVE_SRC, + /* 0x11f */ OPT_IGNORE_SETUP, + /* 0x120 */ OPT_PURGE, + /* 0x121 */ OPT_ALIGN_U8, + /* 0x122 */ OPT_ALIGN_LTA, + /* 0x123 */ OPT_ALIGN_PACK, + /* 0x124 */ OPT_ALIGN_BRRES, + /* 0x125 */ OPT_ALIGN_BREFF, + /* 0x126 */ OPT_ALIGN_BREFT, + /* 0x127 */ OPT_ALIGN, + /* 0x128 */ OPT_ENCODE_ALL, + /* 0x129 */ OPT_ENCODE_IMG, + /* 0x12a */ OPT_NO_ENCODE, + /* 0x12b */ OPT_NO_RECURSE, + /* 0x12c */ OPT_AUTO_ADD, + /* 0x12d */ OPT_NO_ECHO, + /* 0x12e */ OPT_PT_DIR, + /* 0x12f */ OPT_RM_AIPARAM, + /* 0x130 */ OPT_U8, + /* 0x131 */ OPT_SZS, + /* 0x132 */ OPT_WU8, + /* 0x133 */ OPT_XWU8, + /* 0x134 */ OPT_WBZ, + /* 0x135 */ OPT_WLZ, + /* 0x136 */ OPT_LFL, + /* 0x137 */ OPT_PACK, + /* 0x138 */ OPT_BRRES, + /* 0x139 */ OPT_BREFF, + /* 0x13a */ OPT_BREFT, + /* 0x13b */ OPT_NO_COMPRESS, + /* 0x13c */ OPT_FAST, + /* 0x13d */ OPT_LINKS, + /* 0x13e */ OPT_BASEDIR, + /* 0x13f */ OPT_DECODE, + /* 0x140 */ OPT_MIPMAPS, + /* 0x141 */ OPT_NO_MIPMAPS, + /* 0x142 */ OPT_N_MIPMAPS, + /* 0x143 */ OPT_MAX_MIPMAPS, + /* 0x144 */ OPT_MIPMAP_SIZE, + /* 0x145 */ OPT_FAST_MIPMAPS, + /* 0x146 */ OPT_CMPR_DEFAULT, + /* 0x147 */ OPT_CUT, + /* 0x148 */ OPT_RAW, + /* 0x149 */ OPT_SECTIONS, }; // diff --git a/project/src/ui/ui-wszst.h b/project/src/ui/ui-wszst.h index 0fb58cf..e8774b0 100644 --- a/project/src/ui/ui-wszst.h +++ b/project/src/ui/ui-wszst.h @@ -213,6 +213,7 @@ typedef enum enumOptions OPT_HELP, OPT_XHELP, OPT_CONFIG, + OPT_YDEBUG, OPT_ALLOW_ALL, OPT_COMPATIBLE, OPT_WIDTH, @@ -298,7 +299,7 @@ typedef enum enumOptions OPT_NEW, OPT_EXTRACT, - OPT__N_TOTAL // == 237 + OPT__N_TOTAL // == 238 } enumOptions; @@ -1242,6 +1243,7 @@ typedef enum enumGetOpt GO_XHELP = 0x80, GO_CONFIG, + GO_YDEBUG, GO_ALLOW_ALL, GO_COMPATIBLE, GO_WIDTH, diff --git a/project/src/wbmgt.c b/project/src/wbmgt.c index efe538b..e0161b1 100644 --- a/project/src/wbmgt.c +++ b/project/src/wbmgt.c @@ -779,6 +779,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wctct.c b/project/src/wctct.c index 7cbe6b5..754d58b 100644 --- a/project/src/wctct.c +++ b/project/src/wctct.c @@ -760,6 +760,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wimgt.c b/project/src/wimgt.c index 3385d5b..5071f5c 100644 --- a/project/src/wimgt.c +++ b/project/src/wimgt.c @@ -508,7 +508,7 @@ static enumError cmd_copy() : fform_dest != FF_UNKNOWN ? fform_dest : src_f; - PRINT("FFORM = %s\n",GetNameFF(0,fform)); + PRINT0("FFORM = %s\n",GetNameFF(0,fform)); char dest[PATH_MAX]; SubstDest(dest,sizeof(dest),arg,opt_dest,0,0,false); @@ -529,7 +529,8 @@ static enumError cmd_copy() continue; } - if ( verbose >= 0 || testmode ) + const bool create_tpl = IsTplFF(fform); + if ( !create_tpl && ( verbose >= 0 || testmode )) { image_format_t iform = img.tform_valid && img.tform_iform != IMG_INVALID ? img.tform_iform : img.iform; @@ -548,12 +549,34 @@ static enumError cmd_copy() if (opt_pre_convert) TransformIMG(&img,2); + tpl_raw_t raw; + if (create_tpl) + { + err = CreateRawTPL(&raw,&img,fform); + + if ( verbose >= 0 || testmode ) + { + fform = IsTplHeaderEx(raw.data.ptr,raw.data.len) ? FF_TPLX : FF_TPL; + fprintf(stdlog,"%s%sCOPY %s:%s -> %s:%s\n", + verbose > 0 ? "\n" : "", + testmode ? "WOULD " : "", + PrintFormat3(src_f,src_i,src_p), + arg, + PrintFormat3(fform,img.iform,img.pform), + dest ); + } + } + if (!testmode) { - err = SaveIMG(&img,fform,0,0,dest,samefile); + err = create_tpl + ? SaveRawTPL(&raw,0,dest,samefile) + : SaveIMG(&img,fform,0,0,dest,samefile);; if ( err > ERR_WARNING ) return err; } + if (create_tpl) + ResetRawTPL(&raw); ResetIMG(&img); } @@ -592,6 +615,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wkclt.c b/project/src/wkclt.c index 3e81ce2..a70c2f9 100644 --- a/project/src/wkclt.c +++ b/project/src/wkclt.c @@ -1309,6 +1309,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wkmpt.c b/project/src/wkmpt.c index fdde615..c91cda6 100644 --- a/project/src/wkmpt.c +++ b/project/src/wkmpt.c @@ -1597,6 +1597,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wlect.c b/project/src/wlect.c index f63bbd4..257f24d 100644 --- a/project/src/wlect.c +++ b/project/src/wlect.c @@ -2745,6 +2745,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wmdlt.c b/project/src/wmdlt.c index f9e3ddc..a39b068 100644 --- a/project/src/wmdlt.c +++ b/project/src/wmdlt.c @@ -552,6 +552,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wpatt.c b/project/src/wpatt.c index a0be792..c4424d8 100644 --- a/project/src/wpatt.c +++ b/project/src/wpatt.c @@ -352,6 +352,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wstrt.c b/project/src/wstrt.c index 90ba786..800275a 100644 --- a/project/src/wstrt.c +++ b/project/src/wstrt.c @@ -1599,6 +1599,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wszst.c b/project/src/wszst.c index 40fb3b4..e6bdee2 100644 --- a/project/src/wszst.c +++ b/project/src/wszst.c @@ -303,9 +303,9 @@ static const sizeof_info_t sizeof_info_szs_list[] = SIZEOF_INFO_ENTRY(BZIP2_t) SIZEOF_INFO_ENTRY(BZ2Manager_t) SIZEOF_INFO_ENTRY(BZ2Source_t) + SIZEOF_INFO_ENTRY(CompressManager_t) SIZEOF_INFO_ENTRY(sha1_type_t) SIZEOF_INFO_ENTRY(sha1_db_t) - SIZEOF_INFO_ENTRY(DistributionInfo_t) SIZEOF_INFO_ENTRY(pack_header_t) SIZEOF_INFO_ENTRY(pack_metric_t) SIZEOF_INFO_ENTRY(check_cache_t) @@ -371,10 +371,12 @@ static const sizeof_info_t sizeof_info_szs_list[] = SIZEOF_INFO_ENTRY(GenericImgParam_t) SIZEOF_INFO_ENTRY(cmpr_info_t) SIZEOF_INFO_ENTRY(tpl_header_t) + SIZEOF_INFO_ENTRY(tpl_header_ex_t) SIZEOF_INFO_ENTRY(tpl_imgtab_t) SIZEOF_INFO_ENTRY(tpl_pal_header_t) SIZEOF_INFO_ENTRY(tpl_img_header_t) SIZEOF_INFO_ENTRY(tpl_raw_t) + SIZEOF_INFO_ENTRY(tpl_signature_t) SIZEOF_INFO_ENTRY(bti_header_t) SIZEOF_INFO_TITLE("KCL") @@ -5790,6 +5792,7 @@ static enumError CheckOptions ( int argc, char ** argv, bool is_env ) case GO_HELP: help_exit(false); case GO_XHELP: help_exit(true); case GO_CONFIG: opt_config = optarg; break; + case GO_YDEBUG: enable_ydebug++; break; case GO_ALLOW_ALL: allow_all = true; break; case GO_COMPATIBLE: err += ScanOptCompatible(optarg); break; case GO_WIDTH: err += ScanOptWidth(optarg); break; diff --git a/project/src/wtest.c b/project/src/wtest.c index f65fe65..3cc7003 100644 --- a/project/src/wtest.c +++ b/project/src/wtest.c @@ -4770,7 +4770,6 @@ lta_file_ref_t LoadFileLTA ( int slot, int par_index ) const lta_info_t *info = FindInfoLTA(slot); if (info) { -xBINGO; char fname[sizeof(LTA_PATH)+10]; snprintf(fname,sizeof(fname),LTA_PATH,info->index); DVDFileInfo fi; -- cgit v1.3.1