Difference between revisions of "Hacker's Guide"

From OdaWiki
(Code structure)
(Code structure)
Line 1: Line 1:
 
== Code structure ==
 
== Code structure ==
 +
 +
=== Conventional file prefix ===
  
 
* '''am_*''': automap related code
 
* '''am_*''': automap related code
 
* '''c_*''': console related code
 
* '''c_*''': console related code
 
* '''cl_*''': client only code
 
* '''cl_*''': client only code
* '''d_*': game/net code
+
* '''d_*''': game/net code
 
* '''f_*''': finale related code
 
* '''f_*''': finale related code
 
* '''g_*''': game related code
 
* '''g_*''': game related code
Line 13: Line 15:
 
* '''s_*''': sound related code
 
* '''s_*''': sound related code
 
* '''sv_*''': server only code
 
* '''sv_*''': server only code
 +
* '''st_*''': ???
 
* '''v_*''': video related code
 
* '''v_*''': video related code
 
* '''wi_*''': intermission related code
 
* '''wi_*''': intermission related code
 +
 +
=== Files of interest ===
 +
 +
* '''i_main.cpp''': application entry point
  
 
== Style and guidelines ==
 
== Style and guidelines ==

Revision as of 19:56, 31 August 2006

Code structure

Conventional file prefix

  • am_*: automap related code
  • c_*: console related code
  • cl_*: client only code
  • d_*: game/net code
  • f_*: finale related code
  • g_*: game related code
  • hu_*: hud related code
  • i_*: system/hardware dependant code
  • p_*: game/object related code
  • r_*: render related code
  • s_*: sound related code
  • sv_*: server only code
  • st_*: ???
  • v_*: video related code
  • wi_*: intermission related code

Files of interest

  • i_main.cpp: application entry point

Style and guidelines

  • Avoid C style strings. Replace them with C++ types where it is safe to do so.
  • Code defensively and securely
  • Do not add globals
  • Code for clarity
  • Maintain traditional naming conventions
  • Respect existing code