User:Altazimuth/Code Guide: Difference between revisions
From Eternity Wiki
Jump to navigationJump to search
Altazimuth (talk | contribs) (Added all prefixes/VS folder names. Filled out table some more.) |
Altazimuth (talk | contribs) (Filled out table more. Put in basic control flow.) |
||
Line 1: | Line 1: | ||
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). | 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). | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 43: | Line 43: | ||
|- | |- | ||
! F_ | ! F_ | ||
| || || | | Finale Code || Code and functions that handle game completion, final screen animations, and screen wipe effects || | ||
|- | |- | ||
! G_ | ! G_ | ||
| || || | | Game Code || || | ||
|- | |- | ||
! 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_ | ||
Line 67: | Line 67: | ||
|- | |- | ||
! Misc | ! Misc | ||
| || || | | Miscellaneous Code || || | ||
|- | |- | ||
! Mn_ | ! Mn_ | ||
| || || | | Menu Code || Code and functions that run the menu engine || | ||
|- | |- | ||
! P_ | ! P_ | ||
Line 76: | Line 76: | ||
|- | |- | ||
! 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). |
Revision as of 08:55, 7 June 2016
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).
Prefix/Visual Studio Folder Name | Meaning | Explanation | Further Reading |
---|---|---|---|
A_ | Action Pointer Code | Code and functions associated with actor states/frames | List of codepointers |
ACS_ | ACS Code | Code and functions that handle the loading and execution of Action Code Script | ACS scripting |
AM_ | Automap Code | Code and functions associated with the Automap | Automap |
AMX_ | Small Code | Code and functions to handle Small (DEPRECATED) | Small |
C_ | Console Code | Code and functions associated with the Console | Console |
Cam | Camera Code | Line of sight checking for cameras | |
Confuse | libConfuse Code | Code and functions associated with the libConfuse configuration file parser library | libConfuse on GitHub |
D_ | |||
doom | |||
E_ | Eternity Extensions | Code and functions handling things that Eternity introduces like Eternity Definition Files and ExtraData | EDF and ExtraData |
EV_ | Line Action Code | Code and functions handling the generalised line action system | Line actions |
F_ | Finale Code | Code and functions that handle game completion, final screen animations, and screen wipe effects | |
G_ | Game Code | ||
GL | OpenGL Code | Code and functions that initialise and handle the OpenGL backend of the engine | |
HAL | Hardware Abstraction Layer Code | Code that introduces layers of abstraction between software and hardware | Hardware abstraction layer |
HU_ | Head-up Display Code | Code and functions that handle the overlay and display of the player's HUD | |
IN | Intermission Code | Code and functions that handle level intermission screens | |
M_ | |||
MetaAPI | |||
Misc | Miscellaneous Code | ||
Mn_ | Menu Code | Code and functions that run the menu engine | |
P_ | |||
R_ | Rendering Code | Code and functions that handle the rendering of the game | |
S_ | Sound Code | Code and functions that handle sound loading and playback | |
SDL_ | SDL Code | Mid-level code that uses the Simple DirectMedia Layer | |
ST_ | Status Bar Code | Code and functions that handle and define the status bar and palette indicates (e.g. bersek) | |
T_ | Plane Mover Code | General plane mover routines (e.g. crushers, platforms, lifts) | |
TXT_ | Text Code | Code and functions that handle the display of text | |
V_ | Video Code | Code and functions that load and verify patches/pngs, store images internally, handle buffers, and various other video functionality | |
W_ | WAD/Resource Code | Code functions that define and handles WADs/ZIPs, their loading, their formats, lump handling | |
Win32 | Windows Code | Code needed specifically for Windows machines | |
XL_ | Parsing Code | Parsing code for EMAPINFO, Hexen MAPINFO, MUSINFO, Hexen Script Lumps (SNDINFO/MUSINFO), and SNDINFO | |
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).