Users browsing this thread: 1 Guest(s)
A Boy and His Blob Wii ANB files
#5
That you so so much!
You have no idea how long I've been wanting to rip these sprites Big Grin

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 Smile
Reply
Thanked by:


Messages In This Thread
A Boy and His Blob Wii ANB files - by Ploaj - 03-28-2015, 11:29 AM
RE: A Boy and His Blob Wii ANB files - by puggsoy - 03-28-2015, 09:17 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 03-28-2015, 09:45 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-23-2015, 11:23 AM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-23-2015, 11:46 AM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-23-2015, 03:58 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-23-2015, 04:15 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-23-2015, 06:46 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-23-2015, 07:03 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-23-2015, 09:01 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-23-2015, 09:39 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-23-2015, 10:17 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-23-2015, 10:55 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-24-2015, 05:54 AM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-24-2015, 10:52 AM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-24-2015, 01:25 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-24-2015, 02:03 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-24-2015, 02:21 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-24-2015, 07:57 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-24-2015, 10:01 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-24-2015, 10:04 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-24-2015, 10:18 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 05-24-2015, 10:41 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-25-2015, 06:43 AM
RE: A Boy and His Blob Wii ANB files - by Ton - 05-26-2015, 02:38 PM
RE: A Boy and His Blob Wii ANB files - by Daxar - 05-31-2015, 01:16 PM
RE: A Boy and His Blob Wii ANB files - by Ploaj - 06-01-2015, 12:56 AM

Forum Jump: