luckytyphlosion
luckytyphlosion
Fyi, count might have issues because it can be used as a verb? ```c static u32 Save_CalcNumModifiedPCBoxes(SaveData *saveData) { return PCModifiedFlags_CountModifiedBoxes(Save_CalcPCBoxModifiedFlags(saveData)); } ```
Idea: use LIMIT for "hardware" limit ```c // take a guess what this array is extern const u8 gPokeBallItems[]; #define MAX_GROUND_ITEMS 10 #define LIMIT_GROUND_ITEMS 20 typedef struct GroundItem { u16...
The only issue with NUM is that it can lead to two concepts sharing the same name, e.g. ```c u32 GroundItems_GetNumGroundItems(void) { u32 count; int i; for (i = 0;...
So it seems like we have two choices when referring to set cardinality. Refer to my above code samples when I mention specific functions. # Choice 1 `NUM` for the...
Compilation of symbols containing the phrase "count" or "num" (case insensitive without word boundary): https://pastebin.com/4DGN38mU
Worth mentioning: use `LENGTH` for arrays, not `NUM`. Still some possible conflicts (see `CountNumUniqueBagItems`) ```c #define BAG_LENGTH 20 // BAD // #define NUM_BAG_ITEMS 20 typedef struct Gen1ItemBagSlot { u8 itemId;...
Currently I can think of two options for naming dynamic cardinalities: **Option 1:** ```c typedef struct MapEvents { u32 numBgEvents; u32 numObjectEvents; u32 numWarpEvents; u32 numCoordEvents; // rest omitted }...
There's a lot to take in here, but based on the examples I listed, I think `MAX` is better because it conflicts less with other terms, the necessity of `LIMIT`...
One final thing. Capacity could be used to describe the maximum amount of elements allowed in a "real life" container, so you can use capacity to describe a bag pocket...
Peanut Colada luckytyphlosion — Today at 3:26 PM > I wonder if you could use `NUM` if the container is known to be fixed > so like `NUM_BOXES` could be...