From d57d9129ded6ceb1d98348171c94d41f8a9d37ef Mon Sep 17 00:00:00 2001 From: yellows111 Date: Mon, 18 Dec 2023 23:00:14 +0000 Subject: [PATCH] Bumped RLE raw-copy threshold by 0x100 the icons that Gauntlet: Dark Legacy uses for it's save games are rarely even worth being compressed, considering that it only saves around 2900 bytes from just leaving it uncompressed. However, the fact that it's still compressed while still parsing properly ONLY with this change makes me think many others have had this constant wrong for a while. Could it be lower? needs research. * changed a space for a no-break space in a file input description to make it flow better when text is split. I was considering making this 0.8.0+u1, but eeh, nah. --- icon.js | 7 ++++--- index.htm | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/icon.js b/icon.js index 7b2ea0e..29036ed 100644 --- a/icon.js +++ b/icon.js @@ -7,7 +7,7 @@ var ICONJS_STRICT = true; * @constant {string} * @default */ -const ICONJS_VERSION = "0.8.0"; +const ICONJS_VERSION = "0.8.1"; /** * The RC4 key used for ciphering CodeBreaker Saves. @@ -151,6 +151,7 @@ function setDebug(value) { * @public */ function setStrictness(value) { + console.info("setStrictness is deprecated!"); ICONJS_STRICT = !!value; } @@ -188,7 +189,7 @@ function uncompressTexture(texData) { let uncompressed = new Uint16Array(16384); let offset = 0; for (let index = 0; index < 16384;) { - currentValue = u16le(offset); + let currentValue = u16le(offset); if(currentValue === 0) { // if this is specifically a katamari 1 or 2 icon, skip this byte // because it's formatted like that for some reason @@ -196,7 +197,7 @@ function uncompressTexture(texData) { currentValue = u16le(offset); } offset += 2; - if (currentValue >= 0xff00) { + if (currentValue >= 0xfe00) { // everyone says this is 0xff00 but gauntlet:DL tells me its lower //do a raw copy of the next currentValue bytes let length = ((0x10000 - currentValue)); for (let enumerator = 0; enumerator < length; enumerator++) { diff --git a/index.htm b/index.htm index 10c6a6e..d8b2a88 100644 --- a/index.htm +++ b/index.htm @@ -159,7 +159,7 @@
- +
@@ -761,7 +761,7 @@ icondumper2 (unknown icon.js version) [C: Loading...] — © 2023 yellows111