Cleaner enums with clang-format.

This commit is contained in:
mibi88 2024-08-01 19:14:29 +02:00
parent 771d844bc4
commit 04d4c9e31e
4 changed files with 17 additions and 4 deletions

View file

@ -10,3 +10,4 @@ IndentCaseBlocks: true
IncludeBlocks: Regroup
AllowShortBlocksOnASingleLine: Empty
ColumnLimit: 80
AllowShortEnumsOnASingleLine: false

View file

@ -15,7 +15,11 @@ typedef struct {
unsigned int vars;
} EventHandler;
typedef enum { T_NULL, T_VAR_EDIT, T_AMOUNT } Token;
typedef enum {
T_NULL,
T_VAR_EDIT,
T_AMOUNT
} Token;
typedef enum {
OP_NULL,

View file

@ -8,9 +8,18 @@
#include <stdint.h>
/* The direction where the player is going to. */
typedef enum { D_UP, D_DOWN, D_LEFT, D_RIGHT } Direction;
typedef enum {
D_UP,
D_DOWN,
D_LEFT,
D_RIGHT
} Direction;
typedef enum { P_LEFTUP = -1, P_CENTER = 0, P_RIGHTDOWN = 1 } Checkpos;
typedef enum {
P_LEFTUP = -1,
P_CENTER = 0,
P_RIGHTDOWN = 1
} Checkpos;
typedef enum {
I_NONE,

View file

@ -13,7 +13,6 @@ enum {
NPC_FRIENDLY = 1, // The player's team
NPC_HOSTILE = 2, // to the player
NPC_ALL = 3
};
/* /!\ Warning /!\