Difference between revisions of "Hacker's Guide"

From OdaWiki
 
(Code structure)
Line 1: Line 1:
 
== Code structure ==
 
== Code structure ==
  
* 'cl_*.cpp': client only code
+
* ''am_*'': automap related code
* 'sv_*.cpp': server only code
+
* ''c_*'': console related code
* 'i_*.cpp': system/hardware dependant code
+
* ''cl_*'': client only code
* 'f_*.cpp': finale related code
+
* ''d_*': game/net code
* 'c_*.cpp': console related code
+
* ''f_*'': finale related code
* 'am_*.cpp': automap related code
+
* ''g_*'': game related code
* 'hu_*.cpp': hud related code
+
* ''hu_*'': hud related code
* 'd_*.cpp': game/net code
+
* ''i_*'': system/hardware dependant code
* 'g_*.cpp': game related code
+
* ''p_*'': game/object related code
* 'p_*.cpp': game/object related code
+
* ''r_*'': render related code
* 's_*.cpp': sound related code
+
* ''s_*'': sound related code
* 'r_*.cpp': render related code
+
* ''sv_*'': server only code
* 'v_*.cpp': video related code
+
* ''v_*'': video related code
* 'am_*.cpp': automap related code
+
* ''wi_*'': intermission related code
* 'wi_*.cpp': intermission related code
+
  
 
== Style and guidelines ==
 
== Style and guidelines ==

Revision as of 19:53, 31 August 2006

Code structure

  • 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
  • v_*: video related code
  • wi_*: intermission related code

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