tron@2186: /* $Id$ */ tron@2186: rubidium@8750: /** @file player_type.h Types related to players. */ truelight@145: rubidium@8750: #ifndef PLAYER_TYPE_H rubidium@8750: #define PLAYER_TYPE_H darkvater@983: rubidium@8759: #include "core/enum_type.hpp" rubidium@8759: peter1138@4603: /** rubidium@8750: * Enum for all players/owners. peter1138@4603: */ rubidium@8750: enum Owner { rubidium@8750: /* Player identifiers All players below MAX_PLAYERS are playable rubidium@8750: * players, above, they are special, computer controlled players */ rubidium@8750: OWNER_BEGIN = 0x00, ///< First Owner rubidium@8750: PLAYER_FIRST = 0x00, ///< First Player, same as owner rubidium@8750: MAX_PLAYERS = 0x08, ///< Maximum numbe rof players rubidium@8750: OWNER_TOWN = 0x0F, ///< A town owns the tile, or a town is expanding rubidium@8750: OWNER_NONE = 0x10, ///< The tile has no ownership rubidium@8750: OWNER_WATER = 0x11, ///< The tile/execution is done by "water" rubidium@8750: OWNER_END, ///< Last + 1 owner rubidium@8750: INVALID_OWNER = 0xFF, ///< An invalid owner rubidium@8750: INVALID_PLAYER = 0xFF, ///< And a valid owner peter1138@4603: rubidium@8750: /* 'Fake' Players used for networks */ rubidium@8750: PLAYER_INACTIVE_CLIENT = 253, ///< The client is joining rubidium@8750: PLAYER_NEW_COMPANY = 254, ///< The client wants a new company rubidium@8750: PLAYER_SPECTATOR = 255, ///< The client is spectating rubidium@8750: }; rubidium@8750: DECLARE_POSTFIX_INCREMENT(Owner); rubidium@8750: rubidium@8750: /** Define basic enum properties */ rubidium@8750: template <> struct EnumPropsT : MakeEnumPropsT {}; rubidium@8750: typedef TinyEnumT OwnerByte; rubidium@8750: rubidium@8750: typedef Owner PlayerID; rubidium@8750: typedef OwnerByte PlayerByte; rubidium@8750: rubidium@8750: struct Player; rubidium@8750: typedef uint32 PlayerFace; ///< player face bits, info see in player_face.h rubidium@8750: rubidium@8750: #endif /* PLAYER_TYPE_H */