RayDevWiki

Rayman Developer Community Wiki

User Tools

Site Tools


cpa:naming

Naming Conventions


"Ubi Hungarian" Notation

Format

[MODULE]_[prefix][PascalCaseName];

Prefixes

Prefix Meaning Notes
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 typedefed 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.txt ยท Last modified: 2024/02/06 15:58 by spitfire_x86