Editing User:Altazimuth/Code Guide

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Eternity's code is built up of .cpp (C++ source code) and .h (header) files split into various prefixes (though dependencies such as libpng may use regular C source files). Each one refers to specific facets of the code. Functions from these files will also be appropriately prefixed (note that the files have lower case prefixes, which functions have upper case).
Eternity's code is split into various prefixes. Each one refers to specific facets of the code. Functions from these files will also be appropriately prefixed (note that the files have lower case prefixes, which functions have upper case).


{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
Line 16: Line 16:
|-
|-
! AM_
! AM_
| Automap Code || Code and functions associated with the Automap || {{doomwiki|Automap}}
| Automap Code || Code and functions associated with the Automap || [http://doomwiki.org/wiki/Automap Automap]
|-
|-
! AMX_  
! AMX_  
Line 28: Line 28:
|-
|-
! Confuse
! Confuse
| libConfuse Code || Code and functions associated with the libConfuse configuration file parser library ||
| libConfuse Code || Code and functions associated with the libConfuse configuration file parser library || [https://github.com/martinh/libconfuse libConfuse on GitHub]
|-
|-
! D_
! D_
| Core Code || Core engine code such as initialisation, main loop, and high-level netcode ||
| || ||
|-
|-
! doom
! doom
| Doom Code || Files that came from the original Doom engine||
| || ||
|-
|-
! E_
! E_
Line 40: Line 40:
|-
|-
!EV_
!EV_
| Events Code || Code and functions handling in-game events, as well as the line system and sector specials || [[Action specials]]
| Line Action Code || Code and functions handling the generalised line action system || [[Line actions]]
|-
|-
! F_
! F_
| Finale Code || Code and functions that handle game completion, final screen animations, and screen wipe effects ||
| || ||
|-
|-
! G_
! G_
| Game State FSA Code || Contains the finite-state automaton for game state, as well as demo playback and recording ||
| || ||
|-
|-
! GL
! GL
| OpenGL Code || Code and functions that initialise and handle the OpenGL backend of the engine ||
| || ||
|-
|-
! HAL
! HAL
| Hardware Abstraction Layer Code || Code that introduces layers of abstraction between software and hardware || [https://en.wikipedia.org/wiki/Hardware_abstraction_layer Hardware abstraction layer]
| || ||
|-
|-
! HU_
! HU_
| Head-up Display Code || Code and functions that handle the overlay and display of the player's HUD ||
| || ||
|-
|-
! IN
! IN
| Intermission Code || Code and functions that handle level intermission screens ||
| || ||
|-
|-
! M_
! M_
| Miscellaneous Utilities || ||
| || ||
|-
|-
! MetaAPI
! MetaAPI
| Metatables and objects || Handles stuff like storage of multiple types in an associative array, or provision of an adapter class for storage of qstrings as metatable properties ||
| || ||
|-
|-
! Misc
! Misc
| Miscellaneous Code || ||
| || ||
|-
|-
! Mn_
! Mn_
| Menu Code || Code and functions that run the menu engine ||
| || ||
|-
|-
! P_
! P_
| Playsim/Playloop || Covers a huge range of stuff like animations, portals, chasecam, etc. ||
| || ||
|-
|-
! R_
! R_
| Rendering Code || Code and functions that handle the rendering of the game ||
| || ||
|-
|-
! S_
! S_
| Sound Code || Code and functions that handle sound loading and playback ||
| || ||
|-
|-
! SDL_
! SDL_
| SDL Code || Mid-level code that uses the Simple DirectMedia Layer ||
| || ||
|-
|-
! ST_
! ST_
| Status Bar Code || Code and functions that handle and define the status bar and palette indicates (e.g. bersek) ||
| || ||
|-
|-
! T_
! T_
| Plane Mover Code || General plane mover routines (e.g. crushers, platforms, lifts) ||
| || ||
|-
|-
! TXT_
! TXT_
| Text Code || Code and functions that handle the display of text ||
| || ||
|-
|-
! V_
! V_
| Video Code || Code and functions that load and verify patches/pngs, store images internally, handle buffers, and various other video functionality  ||
| || ||
|-
|-
! W_
! W_
| WAD/Resource Code || Code functions that define and handles WADs/ZIPs, their loading, their formats, lump handling ||
| || ||
|-
|-
! Win32
! Win32
| Windows Code || Code needed specifically for Windows machines ||
| || ||
|-
|-
! XL_
! XL_
| Parsing Code || Parsing code for EMAPINFO, Hexen MAPINFO, MUSINFO, Hexen Script Lumps (SNDINFO/MUSINFO), and SNDINFO ||
| || ||
|-
|-
! Z_
! Z_
| Zone Memory Allocation Code || Code to perform zone memory allocation, and to define the zone API ||
| || ||
|}
|}
== Basic Control Flow ==
The "main" (where we start) is located in i_main.cpp. In here various systems are initialised and then the real main function where the program happens is called: D_DoomMain(), located in d_main.cpp. In here D_DoomInit() and some other initialisation is performed. From here the game enters its main game loop within the block of code after the while(1).
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: