That you so so much!
You have no idea how long I've been wanting to rip these sprites
Edit:
Oh, I would be super mondo great-full if you could whip something up!
Edit:
Here is the quick notes on the header of the anim file.
4bytes - number of frames
4bytes - filesize
Then I wrote this, I don't know if it's accurate, but it should be close
Number of frames is the number of entries.
The image format:
It has been a while, but here's what I remember.
Image Offset is in the frame data. I think it's like the first or second set of 32bit values. In anvil it's at 0x0C.
It is LZE compressed. (Magic byte is 0x11)
The pixel data is weird. I'll edit the explanation once I find my code.
It's confusing to explain.
Could I just give you my code? It's written in java.
bytes is the decompressed pixel data. Width and height can be found in the header.
Edit:
Oh, and the make color part
Edit:
Lastly, here is the wayforward logo animation. It was among the ones that my script had the most trouble reading.
https://www.dropbox.com/s/kjzq1i3ur87lz8...d.anb?dl=1
If you can get it working, then it should work for all of them
You have no idea how long I've been wanting to rip these sprites
Edit:
Oh, I would be super mondo great-full if you could whip something up!
Edit:
Here is the quick notes on the header of the anim file.
4bytes - number of frames
4bytes - filesize
Then I wrote this, I don't know if it's accurate, but it should be close
Number of frames is the number of entries.
Code:
// then there's a table with some entries
/*
* 4 bytes offset to frame data?
* 4 bytes offset to image data
* 2 bytes for width and height it seems
* 6 bytes nothing??
* 4 bytes num of layers
* 2 bytes zeros padding?
* 4 bytes offset to unknown data
* 4 bytes end offset of unknown
* 4 bytes another end offset?
*/
The image format:
It has been a while, but here's what I remember.
Image Offset is in the frame data. I think it's like the first or second set of 32bit values. In anvil it's at 0x0C.
It is LZE compressed. (Magic byte is 0x11)
The pixel data is weird. I'll edit the explanation once I find my code.
It's confusing to explain.
Could I just give you my code? It's written in java.
bytes is the decompressed pixel data. Width and height can be found in the header.
Code:
public static BufferedImage makeTexture(int[] bytes, int width, int height) throws IOException{
int[] buffer1 = new int[bytes.length / 2];
int[] buffer2 = new int[bytes.length / 2];
int i1 = 0, i2 = 0;
int pointer = 0;
while (i1 + i2 < bytes.length ) {
for (int j = 0; j < 32; j++) {
buffer1[i1++] = bytes[pointer++];
}
for (int j = 0; j < 32; j++) {
buffer2[i2++] = bytes[pointer++];
}
}
pointer = 0;
BufferedImage img = new BufferedImage(width, height,BufferedImage.TYPE_INT_ARGB);
int x = 0, y = 0;
i1 = 0;
i2 = 0;
while (i1 + i2 < bytes.length) {
for (int h = 0; h < 4; h++) {
for (int w = 0; w < 4; w++) {
img.setRGB(x + w,y + h,makeColor(buffer2[i2++], buffer2[i2++],buffer1[i1++ + 1], buffer1[i1++ - 1]));
}
}
x += 4;
if (x >= img.getWidth()) {
x = 0;
y += 4;
}
}
return img;
}
Edit:
Oh, and the make color part
Code:
public static int makeColor(int a, int r, int b, int g) {
return (g << 24) | (b << 16) | (a << 8) | (r);
}
Edit:
Lastly, here is the wayforward logo animation. It was among the ones that my script had the most trouble reading.
https://www.dropbox.com/s/kjzq1i3ur87lz8...d.anb?dl=1
If you can get it working, then it should work for all of them