Code: Select all
enum Owner {
PLAYER_INACTIVE_CLIENT = 253,
PLAYER_NEW_COMPANY = 254,
PLAYER_SPECTATOR = 255,
MAX_PLAYERS = 8,
...
};
typedef Owner PlayerID; ///< PlayerID not a byte
/// but then there is this:
template <typename Tenum_t> struct TinyEnumT
{
...
};
typedef TinyEnumT<Owner> OwnerByte;
typedef OwnerByte PlayerByte;
struct Player {
...
PlayerByte index;
...
};
p->index ///< PlayerByte is a byte, but also a PlayerID???