Heretic source code

The Heretic source code, the C language files from which the HERETIC.EXE file can be generated by a compiler, were released in January, 1999, by Kenn Hoekstra of Activision, acting in concert with Raven Software, shortly following the release of the Doom source code by John Carmack of id Software. It was simultaneously released with the Hexen source code.

Licensing
The Heretic source was initially released under a standard Activision EULA which limited the legal ability of many source ports, particularly those which had transitioned to the GNU General Public License in late 1999, to use the code. This was later corrected in a re-release by James Monroe after a long campaign by the community to have the license changed.

Technical details
Unlike the Doom source release, which was based on the Linux sources to avoid release of any of the proprietary DMX sound library's API or code, the Heretic source as released is for the original MS-DOS version of the game (Heretic itself was not ported to any other platforms, so there was little choice to be made in this matter). As a result, the sources as released cannot be compiled without substantial modification to remove dangling calls to the DMX API.

Significant technological additions made by Raven to the Doom engine for Heretic include translucency for sprites and screen patches, ambient sounds, the ability of the player to look up and down to a limited degree, and an inventory system. In addition, many modules were entirely rewritten with similar but different functionality, including the entirety of the menus, status bar, intermission, multiplayer chat system, HUD, save game code, and low-level video refresh.

It is of particular note that Heretic runs in a DOS planar video Mode 13h, as opposed to the tweaked non-planar Mode Y which was used by Doom. Both modes have an effective resolution of 320x200 with a physical aspect ratio of 4:3, but Mode 13h notoriously does not support page flipping, which can cause a perceived lower framerate.

Compared to the Doom source code, there is significant enjambment of unrelated functionality into single modules, and a severe lack of well-separated header files, resulting in a complete rebuild of the engine with even minor modifications to the code. It is believed the much improved state of the Doom source release by comparison was thanks to the work done by Bernd Kreimeier for his planned book release, and that as a result, the Heretic source release is a much better representation of what the Doom engine looked like in its most unadulterated form.

The released source code is for the final 1.3 version of Heretic and includes support for the Shadow of the Serpent Riders expansion which was added in that version.

Non-source and obsolete files
Several non-source-code and obsolete source files were included with the Heretic source release.