RayDevWiki

Rayman Developer Community Wiki

User Tools

Site Tools


cpa:naming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cpa:naming [2024/02/06 14:32] – created spitfire_x86cpa:naming [2024/02/06 15:58] (current) spitfire_x86
Line 8: Line 8:
  
 === Prefixes === === Prefixes ===
-^ Prefix ^ Meaning ^ Notes ^ + Prefix      Meaning                  Notes  ^ 
-|  ''l''  | long (int) | | +|                                      |         | 
-|  ''''  | | | +^ //Primary types// ^^
-|  ''''  | | | +|  ''l''      | long (int)               | | 
-|  ''''  | | | +|  ''ul''     | unsigned long            | | 
-|  ''''  | | |+ ''w''      short                    | | 
 +|  ''uw''     | unsigned short           | | 
 + ''c''      char                     | | 
 +|  ''uc''     | unsigned char            | | 
 + ''f''      float                    (see ''x'' for more common float prefix) 
 +|  ''v''      | void                     | | 
 +^ //Defined types// ^^^ 
 + ''st''     struct                   | | 
 +|  ''u''      | union                    | | 
 +|  ''e''      | enum                     | | 
 +|  ''b''      | boolean                  | 4-byte ''BOOL'' or 1-byte ''ACP_tdxBool''
 +|  ''sz''     | string                   | null-terminated | 
 +|  ''x''      | ''typedef''ed primitive  | most often used for ''MTH_tdxReal'' (float) | 
 +|  ''h''      | handle                   | | 
 +|  ''bf''     | bit-field                | | 
 +|  ''bf[N]''  | :::                      | uses N bits | 
 +^ //Stacking prefixes// ^^^ 
 +|  ''p_''     | pointer                  | | 
 +|  ''a_''     | array                    | | 
 +|  ''a[N]_''  | :::                      | fixed length of N elements | 
 +|  ''aDEF_''  | :::                      | fixed length defined by a macro | 
 +|  ''d_''     | dynamic array            | | 
 +|  ''fn_''    | function                 | | 
 +|  ''M_''     | macro                    | function-like | 
 +|  ''C_''     | :::                      | constant | 
 +|  ''td''     | typedef                  | | 
 +^ //Other// ^^^ 
 +|  ''g_''     | global                   | | 
 +|  ''s_''     | static                   | | 
 +|  ''n''      | count / number of        | | 
 +|  ''Nb''     | :::                      | | 
 +^ ^^^ 
 + 
 +===== Notes ===== 
 +  * With multiple prefixes, the separating underscore is sometimes omitted (''p_fn'' == ''pfn''
 +  * The naming rules weren't always strictly followed. In some rare cases the prefixes do not match the variable/return type.
cpa/naming.1707229953.txt.gz · Last modified: 2024/02/06 14:32 by spitfire_x86