Doom Wiki
Advertisement

The Doom source code was released by John Carmack in 1998 (?), initially under a not-for-profit license. Later, permission was granted to re-release the source code under the GNU GPL. Because of legal issues regarding the sound library used for Doom, the release was of the source code to the Linux port of Doom. Despite this, within several months several ports had been made back to DOS. As a result several source ports exist.

The source code can be divided into sections. Files and functions within the source code have one or two-letter prefixes to denote their subsystem.

  • am_*: Automap code
  • d_*: Initialisation/general code
  • f_*: "Finale" (end of game) and "screen melt" code.
  • g_*: Main game loop/control
  • hu_*: Heads-up display
  • i_*: System-independent code
  • m_*: Miscellaneous (includes the menu)
  • p_*: Game logic/behaviour
  • r_*: Rendering engine
  • s_*: Sound code
  • st_*: Status bar
  • v_*: General graphic rendering
  • wi_*: End-of level "intermission" screen
  • w_*: Wad file loading
  • z_*: Zone memory allocation system
Advertisement