aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project/dclib/Makefile.rules35
-rw-r--r--project/dclib/dclib-punycode.c208
-rw-r--r--project/dclib/dclib-punycode.h161
-rw-r--r--project/dclib/dclib-punycode.inc279
-rw-r--r--project/dclib/lib-mkw-def.c146
-rw-r--r--project/dclib/lib-mkw-def.h80
-rw-r--r--project/scripts/kcl/remove-sound-triggers.txt25
-rw-r--r--project/src/sha1-db.inc512
-rw-r--r--project/text-files/ctcode.inc/ctcode-setup-arena-cr.inc5
9 files changed, 1451 insertions, 0 deletions
diff --git a/project/dclib/Makefile.rules b/project/dclib/Makefile.rules
new file mode 100644
index 0000000..60bd4a1
--- /dev/null
+++ b/project/dclib/Makefile.rules
@@ -0,0 +1,35 @@
+
+ ###########################################################################
+ # #
+ # _____ ____ #
+ # | __ \ / __ \ _ _ _____ #
+ # | | \ \ / / \_\ | | | | _ \ #
+ # | | \ \| | | | | | |_| | #
+ # | | | || | | | | | ___/ #
+ # | | / /| | __ | | | | _ \ #
+ # | |__/ / \ \__/ / | |___| | |_| | #
+ # |_____/ \____/ |_____|_|_____/ #
+ # #
+ # Wiimms source code library #
+ # #
+ ###########################################################################
+
+#------------------------------------------------------------------------------
+
+.PHONY: dclib
+dclib:
+ @echo ""
+ @echo "DCLIB_THREAD = $(DCLIB_THREAD)"
+ @echo "DCLIB_MYSQL = $(DCLIB_MYSQL)"
+ @echo "DCLIB_TERMINAL = $(DCLIB_TERMINAL)"
+ @echo "DCLIB_NETWORK = $(DCLIB_NETWORK)"
+ @echo "DCLIB_HAVE_USABLE_SIZE = $(DCLIB_HAVE_USABLE_SIZE)"
+ @echo ""
+ @echo "DCLIB_FLAGS = $(DCLIB_FLAGS)"
+ @echo "DCLIB_O_MKW = $(DCLIB_O_MKW)"
+ @echo "DCLIB_O_WIIMMFI = $(DCLIB_O_WIIMMFI)"
+ @echo ""
+ @echo "DCLIB_O = $(DCLIB_O)"
+ @echo ""
+
+#------------------------------------------------------------------------------
diff --git a/project/dclib/dclib-punycode.c b/project/dclib/dclib-punycode.c
new file mode 100644
index 0000000..691ebfe
--- /dev/null
+++ b/project/dclib/dclib-punycode.c
@@ -0,0 +1,208 @@
+
+/***************************************************************************
+ * *
+ * _____ ____ *
+ * | __ \ / __ \ _ _ _____ *
+ * | | \ \ / / \_\ | | | | _ \ *
+ * | | \ \| | | | | | |_| | *
+ * | | | || | | | | | ___/ *
+ * | | / /| | __ | | | | _ \ *
+ * | |__/ / \ \__/ / | |___| | |_| | *
+ * |_____/ \____/ |_____|_|_____/ *
+ * *
+ * Wiimms source code library *
+ * *
+ ***************************************************************************
+ * *
+ * Copyright (c) 2012-2022 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This library is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This library is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+#include "dclib-basics.h"
+#include "dclib-utf8.h"
+#include "dclib-punycode.h"
+
+#include <limits.h>
+
+#include "dclib-punycode.inc"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// Domain2UTF8() ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+uint Domain2UTF8
+(
+ // returns the number of scanned bytes of 'source' or 0 on error
+
+ char *buf, // valid destination buffer
+ int buf_size, // size of 'buf' >= 4
+ const void *source, // NULL or UTF-8 domain to translate
+ int source_len // length of 'source'; if <0: use strlen(source)
+)
+{
+ DASSERT(buf)
+ DASSERT(source||!source_len);
+
+ if ( buf_size < 4 || !source )
+ return 0;
+
+ if ( source_len < 0 )
+ source_len = strlen(source);
+
+ ccp src = source, src_end = source + source_len;
+ char *buf_ptr = buf, *buf_end = buf + buf_size - 2;
+
+ enum { MAX_LEN = 1000 };
+ char name[MAX_LEN+10];
+ punycode_uint pname[MAX_LEN+2];
+ MARK_USED(name,pname);
+
+ while ( src < src_end )
+ {
+ while ( buf_ptr < buf_end && src < src_end && *src == '.' )
+ *buf_ptr++ = *src++;
+ if ( buf_ptr >= buf_end )
+ {
+ if (!src)
+ goto error;
+ break;
+ }
+
+ if ( src >= src_end )
+ break;
+
+ ccp point = strchr(src,'.');
+ if (!point)
+ point = src_end;
+
+ if ( src+4 > src_end || memcmp(src,"xn--",4 ))
+ buf_ptr = StringCopyEM(buf_ptr,buf_end,src,point-src);
+ else
+ {
+ src += 4;
+ punycode_uint olen = MAX_LEN;
+ const enum punycode_status stat
+ = punycode_decode(point-src,src,&olen,pname,0);
+ char *dest = name;
+ if ( stat != punycode_success )
+ dest = name + snprintf(name,sizeof(name),"!ERR=%d",stat);
+ else
+ {
+ punycode_uint *src = pname, *src_end = pname + olen;
+ char *dest_end = name + MAX_LEN;
+ while ( src < src_end && dest < dest_end )
+ dest = PrintUTF8Char(dest,*src++);
+ *dest = 0;
+ }
+
+ buf_ptr = StringCopyEM(buf_ptr,buf_end,name,dest-name);
+ }
+ src = point;
+ }
+
+ *buf_ptr = 0;
+ return src - (ccp)source;
+
+ error:
+ *buf = 0;
+ return 0;
+}
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// Domain2ASCII() ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+uint Domain2ASCII
+(
+ // returns the number of scanned bytes of 'source' or 0 on error
+
+ char *buf, // valid destination buffer
+ int buf_size, // size of 'buf' >= 5
+ const void *source, // NULL or ASCII domain to translate
+ int source_len // length of 'source'; if <0: use strlen(source)
+)
+{
+ DASSERT(buf)
+ DASSERT(source||!source_len);
+
+ if ( buf_size < 5 || !source )
+ return 0;
+
+ if ( source_len < 0 )
+ source_len = strlen(source);
+
+ ccp src = source, src_end = source + source_len;
+ char *buf_ptr = buf, *buf_end = buf + buf_size - 5;
+
+ enum { MAX_LEN = 1000 };
+ char name[MAX_LEN+10];
+ punycode_uint pname[MAX_LEN+2];
+
+ while ( src < src_end )
+ {
+ while ( buf_ptr < buf_end && src < src_end && *src == '.' )
+ *buf_ptr++ = *src++;
+ if ( buf_ptr >= buf_end )
+ {
+ if (!src)
+ goto error;
+ break;
+ }
+
+ if ( src >= src_end )
+ break;
+
+ ccp point = strchr(src,'.');
+ if (!point)
+ point = src_end;
+
+ punycode_uint *dest = pname, *dest_end = pname + MAX_LEN;
+ while ( dest < dest_end && src < point )
+ {
+ u32 code = ScanUTF8AnsiCharE(&src,point);
+ *dest++ = code;
+ }
+
+ punycode_uint olen = MAX_LEN;
+ const enum punycode_status stat =
+ punycode_encode(dest-pname,pname,0,&olen,name);
+ if (stat)
+ goto error;
+
+ if ( olen > 0 && name[olen-1] == '-' )
+ buf_ptr = StringCopyEM(buf_ptr,buf_end,name,olen-1);
+ else
+ {
+ name[olen] = 0;
+ buf_ptr = StringCat2E(buf_ptr,buf_end,"xn--",name);
+ }
+ }
+
+ *buf_ptr = 0;
+ return src - (ccp)source;
+
+ error:
+ *buf = 0;
+ return 0;
+}
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
diff --git a/project/dclib/dclib-punycode.h b/project/dclib/dclib-punycode.h
new file mode 100644
index 0000000..b859223
--- /dev/null
+++ b/project/dclib/dclib-punycode.h
@@ -0,0 +1,161 @@
+
+/***************************************************************************
+ * *
+ * _____ ____ *
+ * | __ \ / __ \ _ _ _____ *
+ * | | \ \ / / \_\ | | | | _ \ *
+ * | | \ \| | | | | | |_| | *
+ * | | | || | | | | | ___/ *
+ * | | / /| | __ | | | | _ \ *
+ * | |__/ / \ \__/ / | |___| | |_| | *
+ * |_____/ \____/ |_____|_|_____/ *
+ * *
+ * Wiimms source code library *
+ * *
+ ***************************************************************************
+ * *
+ * Copyright (c) 2012-2022 by Dirk Clemens <wiimm@wiimm.de> *
+ * *
+ ***************************************************************************
+ * *
+ * This library is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This library is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt *
+ * *
+ ***************************************************************************/
+
+#ifndef DC_LIB_PUNYCODE_H
+#define DC_LIB_PUNYCODE_H 1
+
+#include "dclib-basics.h"
+#include <limits.h>
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// Domain2*() ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+uint Domain2UTF8
+(
+ // returns the number of scanned bytes of 'source' or 0 on error
+
+ char *buf, // valid destination buffer
+ int buf_size, // size of 'buf' >= 4
+ const void *source, // NULL or UTF-8 domain to translate
+ int source_len // length of 'source'; if <0: use strlen(source)
+);
+
+///////////////////////////////////////////////////////////////////////////////
+
+uint Domain2ASCII
+(
+ // returns the number of scanned bytes of 'source' or 0 on error
+
+ char *buf, // valid destination buffer
+ int buf_size, // size of 'buf' >= 5
+ const void *source, // NULL or ASCII domain to translate
+ int source_len // length of 'source'; if <0: use strlen(source)
+);
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// punycode lib ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+
+enum punycode_status
+{
+ punycode_success,
+ punycode_bad_input, /* Input is invalid. */
+ punycode_big_output, /* Output would exceed the space provided. */
+ punycode_overflow /* Input needs wider integers to process. */
+};
+
+#if UINT_MAX >= (1 << 26) - 1
+ typedef unsigned int punycode_uint;
+#else
+ typedef unsigned long punycode_uint;
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+
+enum punycode_status punycode_encode
+(
+ punycode_uint input_length,
+ const punycode_uint input[],
+ const unsigned char case_flags[],
+ punycode_uint *output_length,
+ char output[]
+);
+
+ /* punycode_encode() converts Unicode to Punycode. The input */
+ /* is represented as an array of Unicode code points (not code */
+ /* units; surrogate pairs are not allowed), and the output */
+ /* will be represented as an array of ASCII code points. The */
+ /* output string is *not* null-terminated; it will contain */
+ /* zeros if and only if the input contains zeros. (Of course */
+ /* the caller can leave room for a terminator and add one if */
+ /* needed.) The input_length is the number of code points in */
+ /* the input. The output_length is an in/out argument: the */
+ /* caller passes in the maximum number of code points that it */
+ /* can receive, and on successful return it will contain the */
+ /* number of code points actually output. The case_flags array */
+ /* holds input_length boolean values, where nonzero suggests that */
+ /* the corresponding Unicode character be forced to uppercase */
+ /* after being decoded (if possible), and zero suggests that */
+ /* it be forced to lowercase (if possible). ASCII code points */
+ /* are encoded literally, except that ASCII letters are forced */
+ /* to uppercase or lowercase according to the corresponding */
+ /* uppercase flags. If case_flags is a null pointer then ASCII */
+ /* letters are left as they are, and other code points are */
+ /* treated as if their uppercase flags were zero. The return */
+ /* value can be any of the punycode_status values defined above */
+ /* except punycode_bad_input; if not punycode_success, then */
+ /* output_size and output might contain garbage. */
+
+///////////////////////////////////////////////////////////////////////////////
+
+enum punycode_status punycode_decode
+(
+ punycode_uint input_length,
+ const char input[],
+ punycode_uint *output_length,
+ punycode_uint output[],
+ unsigned char case_flags[]
+);
+
+ /* punycode_decode() converts Punycode to Unicode. The input is */
+ /* represented as an array of ASCII code points, and the output */
+ /* will be represented as an array of Unicode code points. The */
+ /* input_length is the number of code points in the input. The */
+ /* output_length is an in/out argument: the caller passes in */
+ /* the maximum number of code points that it can receive, and */
+ /* on successful return it will contain the actual number of */
+ /* code points output. The case_flags array needs room for at */
+ /* least output_length values, or it can be a null pointer if the */
+ /* case information is not needed. A nonzero flag suggests that */
+ /* the corresponding Unicode character be forced to uppercase */
+ /* by the caller (if possible), while zero suggests that it be */
+ /* forced to lowercase (if possible). ASCII code points are */
+ /* output already in the proper case, but their flags will be set */
+ /* appropriately so that applying the flags would be harmless. */
+ /* The return value can be any of the punycode_status values */
+ /* defined above; if not punycode_success, then output_length, */
+ /* output, and case_flags might contain garbage. On success, the */
+ /* decoder will never need to write an output_length greater than */
+ /* input_length, because of how the encoding is defined. */
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////// E N D ///////////////
+///////////////////////////////////////////////////////////////////////////////
+
+#endif // DC_LIB_PUNYCODE_H
diff --git a/project/dclib/dclib-punycode.inc b/project/dclib/dclib-punycode.inc
new file mode 100644
index 0000000..276138f
--- /dev/null
+++ b/project/dclib/dclib-punycode.inc
@@ -0,0 +1,279 @@
+
+/***************************************************************************
+ * *
+ * _____ ____ *
+ * | __ \ / __ \ _ _ _____ *
+ * | | \ \ / / \_\ | | | | _ \ *
+ * | | \ \| | | | | | |_| | *
+ * | | | || | | | | | ___/ *
+ * | | / /| | __ | | | | _ \ *
+ * | |__/ / \ \__/ / | |___| | |_| | *
+ * |_____/ \____/ |_____|_|_____/ *
+ * *
+ * Wiimms source code library *
+ * *
+ ***************************************************************************
+ * *
+ * punycode.c from RFC 3492 *
+ * http://www.nicemice.net/idn/ *
+ * Adam M. Costello *
+ * http://www.nicemice.net/amc/ *
+ * *
+ * This is ANSI C code (C89) implementing Punycode (RFC 3492). *
+ * *
+ ***************************************************************************/
+
+/*** Bootstring parameters for Punycode ***/
+
+enum { base = 36, tmin = 1, tmax = 26, skew = 38, damp = 700,
+ initial_bias = 72, initial_n = 0x80, delimiter = 0x2D };
+
+/* basic(cp) tests whether cp is a basic code point: */
+#define basic(cp) ((punycode_uint)(cp) < 0x80)
+
+/* delim(cp) tests whether cp is a delimiter: */
+#define delim(cp) ((cp) == delimiter)
+
+/* decode_digit(cp) returns the numeric value of a basic code */
+/* point (for use in representing integers) in the range 0 to */
+/* base-1, or base if cp is does not represent a value. */
+
+static punycode_uint decode_digit(punycode_uint cp)
+{
+ return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
+ cp - 97 < 26 ? cp - 97 : base;
+}
+
+/* encode_digit(d,flag) returns the basic code point whose value */
+/* (when used for representing integers) is d, which needs to be in */
+/* the range 0 to base-1. The lowercase form is used unless flag is */
+/* nonzero, in which case the uppercase form is used. The behavior */
+/* is undefined if flag is nonzero and digit d has no uppercase form. */
+
+static char encode_digit(punycode_uint d, int flag)
+{
+ return d + 22 + 75 * (d < 26) - ((flag != 0) << 5);
+ /* 0..25 map to ASCII a..z or A..Z */
+ /* 26..35 map to ASCII 0..9 */
+}
+
+/* flagged(bcp) tests whether a basic code point is flagged */
+/* (uppercase). The behavior is undefined if bcp is not a */
+/* basic code point. */
+
+#define flagged(bcp) ((punycode_uint)(bcp) - 65 < 26)
+
+/* encode_basic(bcp,flag) forces a basic code point to lowercase */
+/* if flag is zero, uppercase if flag is nonzero, and returns */
+/* the resulting code point. The code point is unchanged if it */
+/* is caseless. The behavior is undefined if bcp is not a basic */
+/* code point. */
+
+static char encode_basic(punycode_uint bcp, int flag)
+{
+ bcp -= (bcp - 97 < 26) << 5;
+ return bcp + ((!flag && (bcp - 65 < 26)) << 5);
+}
+
+/*** Platform-specific constants ***/
+
+/* maxint is the maximum value of a punycode_uint variable: */
+static const punycode_uint maxint = -1;
+/* Because maxint is unsigned, -1 becomes the maximum value. */
+
+/*** Bias adaptation function ***/
+
+static punycode_uint adapt(
+ punycode_uint delta, punycode_uint numpoints, int firsttime )
+{
+ punycode_uint k;
+
+ delta = firsttime ? delta / damp : delta >> 1;
+ /* delta >> 1 is a faster way of doing delta / 2 */
+ delta += delta / numpoints;
+
+ for (k = 0; delta > ((base - tmin) * tmax) / 2; k += base) {
+ delta /= base - tmin;
+ }
+
+ return k + (base - tmin + 1) * delta / (delta + skew);
+}
+
+/*** Main encode function ***/
+
+enum punycode_status punycode_encode(
+ punycode_uint input_length,
+ const punycode_uint input[],
+ const unsigned char case_flags[],
+ punycode_uint *output_length,
+ char output[] )
+{
+ punycode_uint n, delta, h, b, out, max_out, bias, j, m, q, k, t;
+
+ /* Initialize the state: */
+
+ n = initial_n;
+ delta = out = 0;
+ max_out = *output_length;
+ bias = initial_bias;
+
+ /* Handle the basic code points: */
+
+ for (j = 0; j < input_length; ++j) {
+ if (basic(input[j])) {
+ if (max_out - out < 2) return punycode_big_output;
+ output[out++] =
+ case_flags ? encode_basic(input[j], case_flags[j]) : input[j];
+ }
+ /* else if (input[j] < n) return punycode_bad_input; */
+ /* (not needed for Punycode with unsigned code points) */
+ }
+
+ h = b = out;
+
+ /* h is the number of code points that have been handled, b is the */
+ /* number of basic code points, and out is the number of characters */
+ /* that have been output. */
+
+ if (b > 0) output[out++] = delimiter;
+
+ /* Main encoding loop: */
+
+ while (h < input_length) {
+ /* All non-basic code points < n have been */
+ /* handled already. Find the next larger one: */
+
+ for (m = maxint, j = 0; j < input_length; ++j) {
+ /* if (basic(input[j])) continue; */
+ /* (not needed for Punycode) */
+ if (input[j] >= n && input[j] < m) m = input[j];
+ }
+
+ /* Increase delta enough to advance the decoder's */
+ /* <n,i> state to <m,0>, but guard against overflow: */
+
+ if (m - n > (maxint - delta) / (h + 1)) return punycode_overflow;
+ delta += (m - n) * (h + 1);
+ n = m;
+
+ for (j = 0; j < input_length; ++j) {
+ /* Punycode does not need to check whether input[j] is basic: */
+ if (input[j] < n /* || basic(input[j]) */ ) {
+ if (++delta == 0) return punycode_overflow;
+ }
+
+ if (input[j] == n) {
+ /* Represent delta as a generalized variable-length integer: */
+
+ for (q = delta, k = base; ; k += base) {
+ if (out >= max_out) return punycode_big_output;
+
+ t = k <= bias /* + tmin */ ? tmin : /* +tmin not needed */
+ k >= bias + tmax ? tmax : k - bias;
+ if (q < t) break;
+ output[out++] = encode_digit(t + (q - t) % (base - t), 0);
+ q = (q - t) / (base - t);
+ }
+
+ output[out++] = encode_digit(q, case_flags && case_flags[j]);
+ bias = adapt(delta, h + 1, h == b);
+ delta = 0;
+ ++h;
+ }
+ }
+
+ ++delta, ++n;
+ }
+
+ *output_length = out;
+ return punycode_success;
+}
+
+/*** Main decode function ***/
+
+enum punycode_status punycode_decode(
+ punycode_uint input_length,
+ const char input[],
+ punycode_uint *output_length,
+ punycode_uint output[],
+ unsigned char case_flags[] )
+{
+ punycode_uint n, out, i, max_out, bias,
+ b, j, in, oldi, w, k, digit, t;
+
+ /* Initialize the state: */
+
+ n = initial_n;
+ out = i = 0;
+ max_out = *output_length;
+ bias = initial_bias;
+
+ /* Handle the basic code points: Let b be the number of input code */
+ /* points before the last delimiter, or 0 if there is none, then */
+ /* copy the first b code points to the output. */
+
+ for (b = j = 0; j < input_length; ++j) if (delim(input[j])) b = j;
+ if (b > max_out) return punycode_big_output;
+
+ for (j = 0; j < b; ++j) {
+ if (case_flags) case_flags[out] = flagged(input[j]);
+ if (!basic(input[j])) return punycode_bad_input;
+ output[out++] = input[j];
+ }
+
+ /* Main decoding loop: Start just after the last delimiter if any */
+ /* basic code points were copied; start at the beginning otherwise. */
+
+ for (in = b > 0 ? b + 1 : 0; in < input_length; ++out) {
+
+ /* in is the index of the next character to be consumed, and */
+ /* out is the number of code points in the output array. */
+
+ /* Decode a generalized variable-length integer into delta, */
+ /* which gets added to i. The overflow checking is easier */
+ /* if we increase i as we go, then subtract off its starting */
+ /* value at the end to obtain delta. */
+
+ for (oldi = i, w = 1, k = base; ; k += base) {
+ if (in >= input_length) return punycode_bad_input;
+ digit = decode_digit(input[in++]);
+ if (digit >= base) return punycode_bad_input;
+ if (digit > (maxint - i) / w) return punycode_overflow;
+ i += digit * w;
+ t = k <= bias /* + tmin */ ? tmin : /* +tmin not needed */
+ k >= bias + tmax ? tmax : k - bias;
+ if (digit < t) break;
+ if (w > maxint / (base - t)) return punycode_overflow;
+ w *= (base - t);
+ }
+
+ bias = adapt(i - oldi, out + 1, oldi == 0);
+
+ /* i was supposed to wrap around from out+1 to 0, */
+ /* incrementing n each time, so we'll fix that now: */
+
+ if (i / (out + 1) > maxint - n) return punycode_overflow;
+ n += i / (out + 1);
+ i %= (out + 1);
+
+ /* Insert n at position i of the output: */
+
+ /* not needed for Punycode: */
+ /* if (decode_digit(n) <= base) return punycode_invalid_input; */
+ if (out >= max_out) return punycode_big_output;
+
+ if (case_flags) {
+ memmove(case_flags + i + 1, case_flags + i, out - i);
+
+ /* Case of last character determines uppercase flag: */
+ case_flags[i] = flagged(input[in - 1]);
+ }
+
+ memmove(output + i + 1, output + i, (out - i) * sizeof *output);
+ output[i++] = n;
+ }
+
+ *output_length = out;
+ return punycode_success;
+}
+
diff --git a/project/dclib/lib-mkw-def.c b/project/dclib/lib-mkw-def.c
new file mode 100644
index 0000000..dbd0e5d
--- /dev/null
+++ b/project/dclib/lib-mkw-def.c
@@ -0,0 +1,146 @@
+/************************************************************************
+ * *
+ * _____ ____ *
+ * | __ \ / __ \ _ _ _____ *
+ * | | \ \ / / \_\ | | | | _ \ *
+ * | | \ \| | | | | | |_| | *
+ * | | | || | | | | | ___/ *
+ * | | / /| | __ | | | | _ \ *
+ * | |__/ / \ \__/ / | |___| | |_| | *
+ * |_____/ \____/ |_____|_|_____/ *
+ * *
+ * A php library by Dirk Clemens *
+ * *
+ * Copyright (c) 2014-2022 by Dirk Clemens <develop@cle-mens.de> *
+ * *
+ ************************************************************************
+ * *
+ * This file is generated automatically by a script and is *
+ * therefore always overwritten. So don't EDIT this file, *
+ * because all modifications will be lost with the next update! *
+ * *
+ ************************************************************************/
+
+#include "lib-mkw-def.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+MkwTrackCategory_t * GetMkwTrackCategory ( int id )
+{
+ static MkwTrackCategory_t id_MTCAT_NINTENDO =
+ {
+ "Original track of Nintendo",
+ 0,
+ G_MTCAT_NINTENDO,
+ "",
+ "n",
+ "Nintendo",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_TEXTURE =
+ {
+ "Accepted texture hack",
+ 0,
+ G_MTCAT_TEXTURE,
+ "green",
+ "t",
+ "Texture",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_DENIED =
+ {
+ "Denied texture hack",
+ 0,
+ G_MTCAT_DENIED,
+ "b_cyan",
+ "d",
+ "Denied",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_EDIT =
+ {
+ "Announced as texture hack, but with more edits",
+ 0,
+ G_MTCAT_EDIT,
+ "b_yellow",
+ "e",
+ "Texture+",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_MODEL =
+ {
+ "Definitely a model hack",
+ 0,
+ G_MTCAT_MODEL,
+ "b_orange",
+ "m",
+ "Model",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_UNKNOWN =
+ {
+ "Unknown track",
+ 0,
+ G_MTCAT_UNKNOWN,
+ "b_red",
+ "u",
+ "Unknown",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_CHEAT =
+ {
+ "Hack clearly created for cheating",
+ 0,
+ G_MTCAT_CHEAT,
+ "b_magenta",
+ "▼",
+ "Cheat",
+ };
+
+ static MkwTrackCategory_t id_MTCAT_CUSTOM =
+ {
+ "Custom track",
+ 0,
+ G_MTCAT_CUSTOM,
+ "cyan_blue",
+ "c",
+ "Custom",
+ };
+
+ static MkwTrackCategory_t id_MTCAT__N =
+ {
+ "(invalid)",
+ 0,
+ G_MTCAT__N,
+ "fail",
+ "?",
+ "-?-",
+ };
+
+ switch(id)
+ {
+ case G_MTCAT_NINTENDO: return &id_MTCAT_NINTENDO;
+ case G_MTCAT_TEXTURE: return &id_MTCAT_TEXTURE;
+ case G_MTCAT_DENIED: return &id_MTCAT_DENIED;
+ case G_MTCAT_EDIT: return &id_MTCAT_EDIT;
+ case G_MTCAT_MODEL: return &id_MTCAT_MODEL;
+ case G_MTCAT_UNKNOWN: return &id_MTCAT_UNKNOWN;
+ case G_MTCAT_CHEAT: return &id_MTCAT_CHEAT;
+ case G_MTCAT_CUSTOM: return &id_MTCAT_CUSTOM;
+ case G_MTCAT__N: return &id_MTCAT__N;
+ default: return 0;
+ };
+}
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+////////////////////////////////// sizeof /////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+const sizeof_info_t sizeof_info_mkw_def[] =
+{
+ SIZEOF_INFO_TITLE("MKW/def structs")
+ SIZEOF_INFO_ENTRY(MkwTrackCategory_t)
+ SIZEOF_INFO_TERM()
+};
diff --git a/project/dclib/lib-mkw-def.h b/project/dclib/lib-mkw-def.h
new file mode 100644
index 0000000..82c73c4
--- /dev/null
+++ b/project/dclib/lib-mkw-def.h
@@ -0,0 +1,80 @@
+/************************************************************************
+ * *
+ * _____ ____ *
+ * | __ \ / __ \ _ _ _____ *
+ * | | \ \ / / \_\ | | | | _ \ *
+ * | | \ \| | | | | | |_| | *
+ * | | | || | | | | | ___/ *
+ * | | / /| | __ | | | | _ \ *
+ * | |__/ / \ \__/ / | |___| | |_| | *
+ * |_____/ \____/ |_____|_|_____/ *
+ * *
+ * A php library by Dirk Clemens *
+ * *
+ * Copyright (c) 2014-2022 by Dirk Clemens <develop@cle-mens.de> *
+ * *
+ ************************************************************************
+ * *
+ * This file is generated automatically by a script and is *
+ * therefore always overwritten. So don't EDIT this file, *
+ * because all modifications will be lost with the next update! *
+ * *
+ ************************************************************************/
+
+#ifndef DCLIB_MKW_DEF_H
+#define DCLIB_MKW_DEF_H 1
+
+#include "dclib-basics.h"
+
+//
+///////////////////////////////////////////////////////////////////////////////
+//////////////////////////// MKW Track Category ///////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+// [[MkwTrackCategory]]
+typedef enum MkwTrackCategory
+{
+ G_MTCAT_NINTENDO = 0,
+ G_MTCAT_TEXTURE = 1,
+ G_MTCAT_DENIED = 2,
+ G_MTCAT_ORIG_KMP_KCL = 2,
+ G_MTCAT_EDIT = 3,
+ G_MTCAT_MODEL = 4,
+ G_MTCAT_UNKNOWN = 5,
+ G_MTCAT_CHEAT = 6,
+ G_MTCAT_CUSTOM = 7,
+ G_MTCAT__N = 8,
+}
+MkwTrackCategory;
+
+
+typedef struct MkwTrackCategory_t
+{
+
+ ccp info;
+ int color_offset;
+ u8 id;
+ char color[9+1];
+ char ch[3+1];
+ char title[8+1];
+}
+MkwTrackCategory_t;
+
+MkwTrackCategory_t * GetMkwTrackCategory ( int id );
+
+
+//
+///////////////////////////////////////////////////////////////////////////////
+////////////////////////////////// sizeof /////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+extern const sizeof_info_t sizeof_info_mkw_def[];
+
+//
+///////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////// E N D /////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+
+#endif // DCLIB_MKW_DEF_H
+
diff --git a/project/scripts/kcl/remove-sound-triggers.txt b/project/scripts/kcl/remove-sound-triggers.txt
new file mode 100644
index 0000000..c6f5ec4
--- /dev/null
+++ b/project/scripts/kcl/remove-sound-triggers.txt
@@ -0,0 +1,25 @@
+###############################
+### (c) Wiimm, 2021-09-24 ###
+###############################
+
+# Setup
+@def start = mSec() # start time, for the status line
+@def rm_count = 0 # remove counter
+
+# Define a function to test the KCL flag for sound trigger
+@function isSound # flag
+ @pdef t = $1 & 0x1f
+ @return t == 0x18
+@endfunction
+
+# Main loop: Iterate through all triangles
+@for t=0;tri$n()-1
+ @if isSound(tri$flag(t))
+ @def status = tri$remove(t)
+ @def rm_count = rm_count+1
+ @endif
+@endfor
+
+# Print a little status line
+@echo " - " rm_count " of " tri$n() " triangles removed in " (mSec()-start) " msec."
+
diff --git a/project/src/sha1-db.inc b/project/src/sha1-db.inc
new file mode 100644
index 0000000..018aa3e
--- /dev/null
+++ b/project/src/sha1-db.inc
@@ -0,0 +1,512 @@
+
+#define SHA1_DB_N 126
+
+static const sha1_db_t sha1_db[SHA1_DB_N+1] =
+{
+ { 42, SHA1T_KCL,
+ { 0x08, 0x03, 0x65, 0x99, 0x5e, 0x09, 0x83, 0xee, 0x05, 0x98,
+ 0x82, 0x9b, 0x39, 0xdb, 0x8a, 0x00, 0xa1, 0xfa, 0x3b, 0xc1, }},
+
+ { 41, SHA1T_MAP,
+ { 0x0b, 0x1f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x5b, }},
+
+ { 125, SHA1T_KMP,
+ { 0xf7, 0x92, 0x3b, 0x4a, 0xba, 0x82, 0xe9, 0xbb, 0xfe, 0x6f,
+ 0x5a, 0xe9, 0x4e, 0x17, 0x1b, 0x74, 0xa3, 0x4b, 0x6a, 0xb7, }},
+
+ { 74, SHA1T_KMP,
+ { 0xf8, 0x39, 0x9b, 0x7a, 0x71, 0xed, 0x66, 0x03, 0x77, 0x37,
+ 0x4a, 0x91, 0x70, 0x9d, 0x52, 0xf6, 0x7f, 0x9a, 0x20, 0x4c, }},
+
+ { 64, SHA1T_KCL,
+ { 0xf8, 0x9e, 0xd9, 0xa9, 0x0f, 0xfa, 0x6b, 0x67, 0x8c, 0xda,
+ 0xf4, 0x53, 0x53, 0x57, 0x8f, 0x0e, 0x91, 0x5d, 0x1d, 0x32, }},
+
+ { 13, SHA1T_MAP,
+ { 0xf9, 0x40, 0xce, 0x1f, 0x66, 0xb6, 0x7c, 0x49, 0xfa, 0x5c,
+ 0x79, 0x04, 0xc5, 0x7a, 0x4a, 0x33, 0x46, 0x91, 0x4c, 0x48, }},
+
+ { 123, SHA1T_KCL,
+ { 0xf9, 0xc3, 0x74, 0x07, 0x13, 0xf6, 0xb5, 0x87, 0x0e, 0x6c,
+ 0x47, 0x44, 0x2b, 0xcc, 0xb7, 0x65, 0x92, 0xcf, 0x40, 0x59, }},
+
+ { 12, SHA1T_MAP,
+ { 0xfa, 0xcd, 0xfa, 0x60, 0xdb, 0x5f, 0x44, 0xc8, 0x08, 0x1e,
+ 0xca, 0x4f, 0xf3, 0x76, 0x66, 0xe7, 0x75, 0x40, 0x1e, 0xd1, }},
+
+ { 34, SHA1T_MAP,
+ { 0xfe, 0x36, 0xb8, 0x3f, 0x6d, 0xc0, 0x63, 0x61, 0xbc, 0x7e,
+ 0xbe, 0x6d, 0x28, 0x02, 0x77, 0x38, 0x94, 0x94, 0xa7, 0xa3, }},
+
+ {0,0,{0}}
+};
+
diff --git a/project/text-files/ctcode.inc/ctcode-setup-arena-cr.inc b/project/text-files/ctcode.inc/ctcode-setup-arena-cr.inc
new file mode 100644
index 0000000..836d7c5
--- /dev/null
+++ b/project/text-files/ctcode.inc/ctcode-setup-arena-cr.inc
@@ -0,0 +1,5 @@
+[SETUP-ARENA]
+
+# Assign new property slots and optionally new music ids to arena slots.
+# Syntax: ARENA_SLOT NEW_PROPERTY_SLOT [NEW_MUSIC_ID]
+