Skip to content

Everything From The Last Year

Compare
Choose a tag to compare
@Torphedo Torphedo released this 24 Dec 19:11

I just realized that I haven't made a release since January of last year. Here's all the changes I can remember right now:

  • Textures can now be dumped without explicit filenames and dimensions being provided by the ALR. I've found a way to reliably guess the resolution of most raw image data, allowing us to guess the format based on pixel size. This lets us access stage textures, player/enemy/boss textures, and lots of others I'm forgetting. It turns out that most ALRs don't have any of the extra data I was relying on.
  • BC1 & BC3 (DXT1 & DXT5) compressed textures are now supported. This allows exports of the player & enemy base color textures, and as well as stage base colors and normals. As far as I know, these are the only compressed formats they used.
  • 16-bit single-channel/greyscale textures are now supported, and all 16bpp textures are assumed to be greyscale. This allows the last of the player textures to be dumped, which look like shadow maps of some kind?
  • Textures whose format and size was guessed without metadata will be in a new textures folder. Textures that had names inside the ALR will dump to the same folder as the tool. This shouldn't be a problem because most named textures have their ALR name in them (like FDLogo4600.dds from FDLogo.alr).
  • Files created in --split mode will now go into a resources folder. Chunk data is named [x].bin, and raw texture data is named resource_[x].bin. Raw texture data can be uploaded to tools like rawpixels.net to play with different pixel formats. The site linked doesn't support compression, so if anyone knows something similar with BC1/BC3 support, let me know.
  • Removed animation data dumping. All the structures are still in the source code, but I removed this while refactoring a while ago. I'll probably add this back soon when I start to focus less on textures.
  • Renamed tool from alr_parser to just alr

Note: some stage normals (like those on Refinery) have an alpha channel, which is pretty strange. These usually leave only glass surfaces visible, so they might be used for something else in the game shaders and not really be alpha data. This also applies to cubemaps and what I think are pre-baked lighting maps. If you see a texture that looks blank, try disabling the alpha channel.

TODO:

  • Add back "stream dumping", which dumps all data from specific chunk IDs into their own files (e.g. all 0x3 chunks are dumped to streams/0x3.bin). This was a feature recently but got removed during refactoring.
  • Add texture replacement. This will probably just come in the form of blindly overwriting image buffers at first, but resolution changes should be possible. Format changes are unlikely to work, but might be possible depending on how the game renderer handles textures.

The Windows build was built with Zig and tested in Wine, please let me know if it crashes or breaks.