Modified GameCreationMenu to make it use PlayersColors (goal -> remove SDL_Colors from model (+easier for some functions))
parent
c433025706
commit
a841982dc5
@ -1,11 +1,20 @@
|
|||||||
#ifndef PLAYERS_COLORS_INCLUDED
|
#ifndef PLAYERS_COLORS_INCLUDED
|
||||||
#define PLAYERS_COLORS_INCLUDED
|
#define PLAYERS_COLORS_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#define MACRO_FOR_EACH_PLAYER_COLOR(M) \
|
||||||
|
M(Red) \
|
||||||
|
M(Violet) \
|
||||||
|
M(Blue) \
|
||||||
|
M(Yellow)
|
||||||
|
|
||||||
|
#define MACRO_GEN_ENUM_PLAYER_COLOR(Elem) Player##Elem,
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PlayerRed,
|
MACRO_FOR_EACH_PLAYER_COLOR(MACRO_GEN_ENUM_PLAYER_COLOR)
|
||||||
PlayerViolet,
|
NB_PLAYER_COLORS
|
||||||
PlayerBlue,
|
|
||||||
PlayerYellow
|
|
||||||
} PlayersColors;
|
} PlayersColors;
|
||||||
|
|
||||||
|
extern const PlayersColors playersColors[];
|
||||||
|
|
||||||
#endif //PLAYERS_COLORS_INCLUDED
|
#endif //PLAYERS_COLORS_INCLUDED
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
#include "model/PlayersColors.h"
|
||||||
|
|
||||||
|
|
||||||
|
const PlayersColors playersColors[] = {
|
||||||
|
MACRO_FOR_EACH_PLAYER_COLOR(MACRO_GEN_ENUM_PLAYER_COLOR)
|
||||||
|
};
|
Loading…
Reference in new issue