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.
This commit is contained in:
yellows111 2023-12-18 23:00:14 +00:00
parent 23ef7c7ca1
commit d57d9129de
2 changed files with 6 additions and 5 deletions

View File

@ -7,7 +7,7 @@ var ICONJS_STRICT = true;
* @constant {string} * @constant {string}
* @default * @default
*/ */
const ICONJS_VERSION = "0.8.0"; const ICONJS_VERSION = "0.8.1";
/** /**
* The RC4 key used for ciphering CodeBreaker Saves. * The RC4 key used for ciphering CodeBreaker Saves.
@ -151,6 +151,7 @@ function setDebug(value) {
* @public * @public
*/ */
function setStrictness(value) { function setStrictness(value) {
console.info("setStrictness is deprecated!");
ICONJS_STRICT = !!value; ICONJS_STRICT = !!value;
} }
@ -188,7 +189,7 @@ function uncompressTexture(texData) {
let uncompressed = new Uint16Array(16384); let uncompressed = new Uint16Array(16384);
let offset = 0; let offset = 0;
for (let index = 0; index < 16384;) { for (let index = 0; index < 16384;) {
currentValue = u16le(offset); let currentValue = u16le(offset);
if(currentValue === 0) { if(currentValue === 0) {
// if this is specifically a katamari 1 or 2 icon, skip this byte // if this is specifically a katamari 1 or 2 icon, skip this byte
// because it's formatted like that for some reason // because it's formatted like that for some reason
@ -196,7 +197,7 @@ function uncompressTexture(texData) {
currentValue = u16le(offset); currentValue = u16le(offset);
} }
offset += 2; 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 //do a raw copy of the next currentValue bytes
let length = ((0x10000 - currentValue)); let length = ((0x10000 - currentValue));
for (let enumerator = 0; enumerator < length; enumerator++) { for (let enumerator = 0; enumerator < length; enumerator++) {

View File

@ -159,7 +159,7 @@
<input type="file" id="psvinput" name="psvinput" accept=".psv" /> <input type="file" id="psvinput" name="psvinput" accept=".psv" />
</div> </div>
<div class="inputbox"> <div class="inputbox">
<label for="spsinput">SharkPort/X-Port export file (.sps, .xps):</label> <label for="spsinput">SharkPort/X-Port export file (.sps,&nbsp;.xps):</label>
<input type="file" id="spsinput" name="spsinput" accept=".sps, .xps" /> <input type="file" id="spsinput" name="spsinput" accept=".sps, .xps" />
</div> </div>
<div class="inputbox"> <div class="inputbox">
@ -761,7 +761,7 @@
<span id="version">icondumper2 <a href="./documentation" id="iconjsVersion">(unknown icon.js version)</a> [C: <span id="clientVersion">Loading...</span>] &mdash; &copy; <span id="currentYear">2023</span> yellows111</span> <span id="version">icondumper2 <a href="./documentation" id="iconjsVersion">(unknown icon.js version)</a> [C: <span id="clientVersion">Loading...</span>] &mdash; &copy; <span id="currentYear">2023</span> yellows111</span>
<script> <script>
document.getElementById("iconjsVersion").textContent = exports.version; document.getElementById("iconjsVersion").textContent = exports.version;
document.getElementById("clientVersion").textContent = "0.8.0"; document.getElementById("clientVersion").textContent = "0.8.0+u1";
document.getElementById("currentYear").textContent = (new Date()).getFullYear().toString(); document.getElementById("currentYear").textContent = (new Date()).getFullYear().toString();
</script> </script>
</body> </body>