Last active
October 19, 2024 07:31
-
-
Save sigsegv-mvm/0f07b1c6d8dd56885f74e03758c11e58 to your computer and use it in GitHub Desktop.
Reverse-engineered EXAPUNKS ".TEX" texture file format details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEX FILE FORMAT | |
Reverse engineering by sigsegv, 20180914. | |
All values are little-endian. | |
0x00 int: TEX file version / magic number [1002 = 0x000003EA] | |
0x04 int: data resolution [x] | |
0x08 int: data resolution [y] | |
0x0C int: color format { 0 => invalid, 1 => 8BPP, 2 => RGBA } | |
0x10 int: display resolution [x] | |
0x14 int: display resolution [y] | |
0x18 int: display bounds [lower x] | |
0x1C int: display bounds [lower y] | |
0x20 int: display bounds [upper x] | |
0x24 int: display bounds [upper y] | |
0x28 float: crop offset [x] | |
0x2C float: crop offset [y] | |
0x30 float: sprite linking info [x] | |
0x34 float: sprite linking info [y] | |
0x38 int: number of LZ4-compressed data bytes | |
0x3C byte[]: LZ4-compressed data bytes... | |
NOTES: | |
- "data resolution" refers to the resolution of the data actually contained in the file | |
- "display resolution" refers to the nominal display resolution of the image in the game | |
- half-sized textures have the same display resolution and display bounds as their full-sized counterparts; | |
they simply have their data resolution numbers halved and contain a quarter as much image data | |
- "display bounds" represents a pair of min and max coordinates that the texture occupies; | |
typically the lower bound will be (0,0) and the upper bound will be (display_res_x,display_res_y) | |
- the "crop offset" data needs further investigation | |
- the "sprite linking info" is apparently used for player and opponent EXA sprites, to link together | |
different sprite parts based on a magenta mask (R=0xFF, G=0x00, B=0xFF, A=0xFF) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay so I actually managed to find my deobfuscated, annotated EXE of EXAPUNKS, still datestamped to Sep 2018! Which is pretty rad.
A couple things my prior post missed: