support esoteric RLE icons
looking at you katamari damacy
This commit is contained in:
parent
4e27fcdc94
commit
0569aa7b0b
6
icon.js
6
icon.js
|
@ -37,6 +37,12 @@ function uncompressTexture(texData) {
|
|||
let offset = 0;
|
||||
for (let index = 0; index < 16384; index++) {
|
||||
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
|
||||
offset += 2;
|
||||
currentValue = u16le(offset);
|
||||
}
|
||||
offset += 2;
|
||||
if (currentValue >= 0xff00) {
|
||||
//do a raw copy
|
||||
|
|
21
input.htm
21
input.htm
|
@ -11,14 +11,14 @@
|
|||
#title1, #title2 {
|
||||
color: yellow;
|
||||
text-align: right;
|
||||
/*text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;*/
|
||||
right: 8px;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
line-height: 0.50em;
|
||||
}
|
||||
#version {position: fixed;bottom:4px;right:4px}
|
||||
#advanced {display: none}
|
||||
#iconcanvas {position: absolute; left: 8px}
|
||||
#titlebox {width: 99%;position: absolute;}
|
||||
input[type="file"] {line-height: 2em;}
|
||||
#version {text-shadow: 1px 1px 2px black;}
|
||||
</style>
|
||||
<meta data-comment="WebGL Shader: Icon">
|
||||
<script type="text/plain" id="shader-icon-v">
|
||||
|
@ -87,9 +87,10 @@
|
|||
<label for="showExtractedInputOption">show other import options</label>
|
||||
<input id="showExtractedInputOption" type="checkbox"></input>
|
||||
<hr>
|
||||
<br>
|
||||
<h1 id="title1">No File</h1>
|
||||
<h1 id="title2">Loaded</h1>
|
||||
<div id="titlebox">
|
||||
<h1 id="title1">No File</h1>
|
||||
<h1 id="title2">Loaded</h1>
|
||||
</div>
|
||||
<span>Background/icon preview:</span><br>
|
||||
<canvas id="bgcanvas" width="360" height="360"></canvas>
|
||||
<canvas id="iconcanvas" width="360" height="360"></canvas>
|
||||
|
@ -116,7 +117,7 @@
|
|||
<br>
|
||||
<p>
|
||||
<span>Date created: </span><span id="dateCreated">--:--:-- --/--/----</span><span> UTC+09:00</span>
|
||||
<br>
|
||||
<span> | </span>
|
||||
<span>Date modified: </span><span id="dateModified">--:--:-- --/--/----</span><span> UTC+09:00</span>
|
||||
</p>
|
||||
<p>
|
||||
|
@ -252,6 +253,8 @@
|
|||
if(!!filebox.files.length) {filebox.onchange();}
|
||||
if(!!iconbox.files.length) {iconbox.onchange();}
|
||||
if(!!psubox.files.length) {psubox.onchange();}
|
||||
if(!!psvbox.files.length) {psvbox.onchange();}
|
||||
if(!!spsbox.files.length) {spsbox.onchange();}
|
||||
}
|
||||
filebox = document.getElementById("input");
|
||||
filebox.onchange = function(e) {
|
||||
|
@ -447,7 +450,7 @@
|
|||
document.getElementById("showExtractedInputOption").onchange = function(e) {
|
||||
document.getElementById("advanced").style.display = ((e.target.checked) ? "block" : "none");
|
||||
}
|
||||
//todo: Animation parsing, animation tweening, whatever's going on with texture type 15
|
||||
//todo: Animation parsing, animation tweening
|
||||
</script>
|
||||
<span id="version">icondumper2 <span id="iconjsVersion">(unknown icon.js version)</span> [C: <span id="clientVersion">Loading...</span>] - © 2023 yellows111</span>
|
||||
<script>document.getElementById("iconjsVersion").textContent = ICONJS_VERSION;</script>
|
||||
|
|
Loading…
Reference in New Issue