meh2481 / wfLZEx

Simple image-decompressing program for WayForward's .anb format used in their game DuckTales: Remastered
Do What The F*ck You Want To Public License
13 stars 5 forks source link

Support for ETC1-flavored .anb files? #12

Closed applecuckoo closed 11 hours ago

applecuckoo commented 1 day ago

@meh2481 Hi! I'm currently working on ripping a couple of LeapFrog games that were developed by WayForward. The .anb files seem to have the same structures as the known working files, although they don't actually decode right since WF used a different type of image compression (probably ETC1). Same for the .tex files. If you're still interested, I've attached the contents of one of the .pak files for you to have a look at. Thank you!

global.zip

meh2481 commented 19 hours ago

fx_dust_poof hazards beetle_portrait cirriculum cutscene docock_portrait electro_portrait fury_portrait fury_right_portrait

Ran some cursory tests and it does look like ETC compression; they messed with their texture header type field, so it's not possible to have a program that supports both old and new .anb formats. One of the texture types (2 in the texture type field in the header) looks to just be ETC and decompresses just fine (evidenced by the spiderman image in cutscene.anb and cirriculum.anb). Texture type 3 seems messed up; not sure what's going on there. Might even be the wrong color; I'm not sure Nick Fury is supposed to be blue. I've pushed up my testing so far to the "etc" branch here. I might not work on this again but it should serve as a good starting point if someone else wants to.

applecuckoo commented 14 hours ago

Thank you! Texture type 3 only looks wrong because the red and blue channels are swapped. Also, not sure if you saw, but there are some .tex files lying around in that global folder. I tried your old shantae_tex converter on those and it looks like they also use ETC1 - I'm not sure if you're up to it, but it would be great if you could spin up an ETC1 version of that as well.

meh2481 commented 14 hours ago

The code is open-source and pull requests are welcome. As I said above, I am not actively working on this project.

applecuckoo commented 11 hours ago

Ah, okay. Could you open source the .tex tool? It looks like the code for it isn't here. That's the only thing left, so I'm closing this issue.

meh2481 commented 11 hours ago

Unfortunately I think I lost the code for tex_decompress somewhere along the way. It's pretty simple, though; it's just the texHeader section of the .anb without any of the jigsaw image recombining stuff.