I'm very pleased to tell you that the textures are stored in the INK files. I've said before that they are dBASE files, but that was a false positive (and looking at the file header I can see why the file util got confused), they are actually images with a prepended header.
As you can see from the last image, for some the color channels are still distorted. I'm assuming there is a field in the header which tells me about how treat the image and its channels.
The INK files themselves are images with a prepended 68-byte header. The width and height are in the bytes at 0x34 and 0x38 and the length of the image that follows is in byte 0x40. The image itself is padded with zeros at the end to fill a 512 byte block (so an image with the length if 900 is padded to 1024). It's 2-byte-per-pixel, which was a pain to brute force, to be honest, with 5/6/5 bits per red/green/blue channel respectively. The last part most likely changes depending on some flag in the header.
I've updated the README of the por-romd-map-extractor with the file description and also added the first version of the reader to the source tree. Currently there is no functionality to convert images, that comes later on, this is just to let you know that the textures are there and available.
There's still a lot to do, fixing the color channels, improving the NAT reader for the models, combining them with textures and at the end writing an exporter for them. The viewer I've written (screenshot from before) also needs to become a lot better as it is currently broken. Animations are out of scope for the time being, while I can already read CNB files, they contain NAB files which seem to the animation data, I cannot parse those. As I've never worked before with skeletal animations, that might get difficult. I'll try to push new state to the repository and README to make sure that knowledge is there as soon as I gain it. Eventually I'll write another article, but only after I'm done with this.
Edited by RobertZenz, 29 August 2024 - 11:41 AM.