A game engine for top-down 2D RPG games.
rpg game-engine raylib c99
at main 1.2 kB view raw
1#ifndef __main__ 2#define __main__ 3 4 5/* 6Include order doesn't really matter to me, however I do like to keep them reasonably organized: 71. "Header" includes (i.e, keraforge/_header.h). 82. Macro/common headers (i.e, keraforge/log.h). 93. Internal library includes (i.e, keraforge/*.h). 104. External library includes (i.e, raylib.h, raymath.h, etc). 115. C standard library includes. 12*/ 13#include <keraforge.h> 14#include <stdio.h> 15 16 17/* 18Please follow good practice when defining macros: 19- #undef after usage. 20- Use do/while blocks for parameterized macros. 21- Wrap constant macros in parenthesis, unless its a string that can be safely concatenated. 22*/ 23 24 25/* Additional keywords (excl. const) should be on their own line. */ 26static 27/* All public items should be prefixed with kf_. All static items should use _kf_. */ 28int _kf_parse(int argc, /* Attach pointers with the identifier, not the type. */ char *argv[]) 29/* Allman braces */ 30{ 31 /* Tabs for indentation, spaces for alignment. */ 32 33 /* Space out your semicolons in for loops. */ 34 for (int i = 0 ; i < argc ; i++) 35 fprintf(stderr, "%s", argv[i]); 36 37 if (true) 38 { 39 /* ... */ 40 } 41 else 42 { 43 /* ... */ 44 } 45 46 return 1; 47} 48 49int main(void) 50{ 51 (void)_kf_parse(0, NULL); 52 return 0; 53} 54 55 56#endif