LGR/Technical
Jump to navigation
Jump to search
Technical information for Elasto Mania LGR files.
.LGR File Format
Offset | Type | Bytes | Description |
---|---|---|---|
0 | char[5] | 5 | "LGR12" for LGR files. (12 refers to the version of LGR file) |
5 | int | 4 | Number of .pcx files contained at the end of the LGR file (x) |
9 | byte[4] | 4 | Pictures.lst: identification header: [0xEA, 0x03, 0x00, 0x00] (required to be a valid file) |
13 | int | 4 | Pictures.lst: Number of elements in .lst file (l) |
17 | char[10]*l | 10*l | Pictures.lst: List of image names, null terminated (e.g. "barrel"+[0,0,0,0]). The maximum name length is 8. |
17+10*l | int*l | 4*l | Pictures.lst: Image type (100=picture, 101=texture, 102=mask) |
17+14*l | int*l | 4*l | Pictures.lst: Default distance (1-999). (Masks have a distance of 0. QUP_/QDOWN_/qfood have distances of 400 - apparently unused?) |
17+18*l | int*l | 4*l | Pictures.lst: Default clipping (0=Unclipped, 1=Ground, 2=Sky) |
17+22*l | int*l | 4*l | Pictures.lst: Location of transparent pixel (11=no transperancy, 12=topleft, 13=topright, 14=bottomleft, 15=bottomright) |
17+26*l | Object | ? | List of x pcx objects of variable length (see Pcx Object below) |
? | byte[4] | 4 | End of file marker: [0xE7, 0x05, 0x2E, 0x0B] |
Pcx Object
Offset | Type | Bytes | Description |
---|---|---|---|
0 | char[12] | 12 | Filename including .pcx, null terminated (e.g. "barrel.pcx"+[0,0] or "plantain.pcx") |
12 | byte[8] | 8 | [0x00, 0x95, 0x4C, 0x00, 0x98, 0x95, 0x4C, 0x00]. Only the first byte is important as 0x00 signifies the end of the filename from the previous row. The other bytes are unused. |
20 | int | 4 | Length of the .pcx file in bytes (z) |
z | byte[z] | z | Raw contents of original .pcx file |