SLADE icon indicating copy to clipboard operation
SLADE copied to clipboard

Support for ROTT's RTL/RTC and ROTT:LE extended RTLX map format

Open AlexMax opened this issue 6 months ago • 0 comments

SLADE Version: N/A Operating System: Any

Issue Details: Rise of the Triad: Ludicrous Edition supports four different level formats. Two of them are the classic RTL/RTC map formats, and two of them are the extended RTLX/RTCX map formats specific to Ludicrous Edition, which support a WAD-style directory.

A description of the RTL/RTC file format can be found here. In essence, it is a list of 100 map structs that point to RLE-encoded map data that is appended at the end of the map structs.

The extended format with the directory has the following headers. I can provide more details if necessary, but all files that ship with ROTT:LE have two lumps - one called "MAPS" which contains the old-school map headers and data, and the other containing a JSON-encoded MAPINFO.

struct header_s
{
    char        signature[4]; // RTL and RTC are old-school level lists, RXL and RXC are modern ROTT:LE map lists
    uint32_t    version; // 0x0101 for RTL/RTC, 0x0200 for RTLX/RTCX
    uint64_t    directoryoffset; // Only in RTLX/RTCX
    uint64_t    directorycount; // Only in RTLX/RTCX
};

struct direntry_s // Only for RTLX/RTCX
{
    char        title[15];
    char        forcenullterminator; // True if the game expects a null terminator at the end of the lump.
    uint64_t    offset;
    uint64_t    length;
};

AlexMax avatar Dec 14 '23 19:12 AlexMax