C
Cyberman
Guest
Ok I'm going to be going through some code and adding a bit of commenting for doxygen.
Also converting prodigious use of constants into named explicite constants.
One simple question though, do we use a macro constant or an actual const.
IE
Code: [Select]
versus
Code: [Select]
Also if a constant is only used in one area of the source code, say for example battle models. I suppose a globalized style declaration is a waste of time (or typing).
local
Ex:
Code: [Select]
versus
globalized
Code: [Select]
I prefer Macro's for MOST constants, save 1 type. Anything that's used in a numerical expression in particular calculations, I prefer typed constants, to get explicite exceptions with any weird coding bugs that may crop up.
Cyb
Also converting prodigious use of constants into named explicite constants.
One simple question though, do we use a macro constant or an actual const.
IE
Code: [Select]
Code:
#define HOLY_MACRO_BATMAN 42f
Code: [Select]
Code:
const float holy_macro_batman = 42f;
local
Ex:
Code: [Select]
Code:
const u32 l_number_of_bones = 0;
globalized
Code: [Select]
Code:
const u32 ps1_ff7_number_of_bones = 0;
Cyb