Open PerryTute opened 2 years ago
It should be possible to convert from
.png
to.data
. I'm not up for it, but if you want to try implementing it yourself, here are few directions on how to approach this:* Most importantly, [DataFileConverter.convert](https://github.com/TeWu/CelesteExtractor/blob/master/src/pl/geek/tewu/celeste_extractor/DataFileConverter.java#L14) method must be modified to do the opposite, of what it's doing. * [`DATA_FILES_GLOB_PATTERN`](https://github.com/TeWu/CelesteExtractor/blob/master/src/pl/geek/tewu/celeste_extractor/FileProcessor.java#L15) must be changed to `"**/*.png"`, so that PNG files are what `FileProcessor` is looking for. * In line defining [`targetFilePath`](https://github.com/TeWu/CelesteExtractor/blob/master/src/pl/geek/tewu/celeste_extractor/FileProcessor.java#L25), `".png"` must be replaced with `".data"`, so that output file names end with `.data` extension.
Hey so I was fairly busy but getting back to having a looksie at doing this, how did you figure out what the run-length encoding algorithim was? I built a solution for the only result I got for "RunLengthEncoding" when de-compiling the executable with ILSpy
{ List<byte> list = new List<byte>(); for (int i = 0; i < str.Length; i++) { byte b = 1; char c; for (c = str[i]; i + 1 < str.Length && str[i + 1] == c; i++) { if (b >= byte.MaxValue) { break; } b = (byte)(b + 1); } list.Add(b); list.Add((byte)c); } return list.ToArray(); }
And this specific algorithim works fine, but after encoding and then decoding with your tool its obvious this isn't the one used for the .data assets.
You discover how? I want to do it too
It should be possible to convert from
.png
to.data
. I'm not up for it, but if you want to try implementing it yourself, here are few directions on how to approach this:DATA_FILES_GLOB_PATTERN
must be changed to"**/*.png"
, so that PNG files are whatFileProcessor
is looking for.targetFilePath
,".png"
must be replaced with".data"
, so that output file names end with.data
extension.