raysan5 / raylib-game-template

A small template to start your raylib game
zlib License
420 stars 101 forks source link

CONVENTIONS omits typedef conventions #4

Closed orcmid closed 2 years ago

orcmid commented 3 years ago

The typedef cases seem to be for title case. It is not shown, although an already-defined type is used in an example.

I am unclear about the situation with all caps types that also happens in raylib.

The trick around using struct declarator names as defined types is also worthy of note. A mindmeld of the C Language type form :).

E.g.,

typedef struct Texture { ... } Texture

static CoreData CORE = { 0 )
raysan5 commented 3 years ago

@orcmid Yeap, the typedef struct convention should be added.

About the all caps variables, those are very special cases: Global variables from structs of structs. I did an exception to notice it and make the code more readable in those special cases. Basically, to easily see functions touching those global states.