Heretic Executable
Format type | Executable / Script |
---|---|
Subformat | Linear Executable (LX/LE) Format |
Type | Compiled |
Platform | MS-DOS |
Code | 32-bit x86 |
Hidden data? | Yes |
Games |
Heretic uses a DOS4GW-based executable (Linear Executable (LX/LE) Format), compiled with Watcom C.
Intermission map locations
Between levels, the first three episodes have intermission maps which present a graphical display of which areas have been completed, and which area the player is about to enter. For each level, there is an X,Y coordinate pair indicating where the next level arrow should point when entering the level, and where the level completed X should appear when the level has already been done. The marks are placed on 320x200 VGA screen, so coordinates must remain within those bounds. A bit of buffer area should also be reserved from the edges of the screen as a "Bad V_DrawPatch" error will occur if the indicator graphics try to draw outside the screen borders.
The table of map locations appears at offset 0x09A8A8 in the v1.3 EXE. Each entry consists of 8 bytes, an INT32LE X coordinate and INT32LE Y coordinate. The table contains 27 entries, with the levels arranged in order from E1M1 through E3M9. The Shadow of the Serpent Riders expansion episodes and the super-secret "episode" don't include intermission map screens so there are no coordinates stored for those even in v1.3.
Music assignments
Unlike Doom, Heretic includes each piece of background music in HERETIC.WAD only once, and relies on a table internal to the EXE to assign music to each level. This allowed the developers to shave a little bloat off of the IWAD size, but makes things a bit more inconvenient for modders looking to include custom music.
The music assignment table is found at offset 0x09C074 of the v1.3 HERETIC.EXE. Each entry is 12 bytes: a 9-byte ASCIIZ string with the 8-character MUS lump name and NULL terminator, plus 3 padding bytes. Assignments start at E1M1 and set music for every map in order through E6M3, then come assignments for the title screen, intermission, and end episode story screens in that order.