sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
686 stars 104 forks source link

Extend the Jaguar image format and add conversion option #1594

Closed viciious closed 7 months ago

viciious commented 8 months ago

I would like to use the Jaguar image format for wall textures for the next version of Doom 32X Resurrection, hence the change. The "standard" texture format in JagDoom is rather silly since there's no header at all and the only way to auto-detect it is by checking if the 320-byte footer in the lump matches the initial 320 bytes. With 100 textures, that would require roughly 32KB of ROM space, which is just too wasteful, since the data in the footer is redundant to begin with.

So my plan is to re-use the JaguarImage format used for 2D gfx for wall textures, but also extend it by adding two new flags in the unused padding space of the header:

Before: Screenshot from 2023-11-06 21-04-20

After: Screenshot from 2023-11-06 21-03-06

viciious commented 8 months ago

As a bonus, the auto-detection of 32x16 JagDoom textures is fixed in commit 17b71bc70c700fe515eca1d4c7059f3a767e5f5a

viciious commented 8 months ago

I've also added conversion to the aforementioned format, however I don't know how I should go about the column-major subformat.

viciious commented 7 months ago

image

I've slightly rewritten the code to allow exporting images to the column major format. It will now show up as "Jaguar CM" in the image formats list.