player_type.h
Go to the documentation of this file.00001
00002
00005 #ifndef PLAYER_TYPE_H
00006 #define PLAYER_TYPE_H
00007
00008 #include "core/enum_type.hpp"
00009
00013 enum Owner {
00014
00015
00016 OWNER_BEGIN = 0x00,
00017 PLAYER_FIRST = 0x00,
00018 MAX_PLAYERS = 0x08,
00019 OWNER_TOWN = 0x0F,
00020 OWNER_NONE = 0x10,
00021 OWNER_WATER = 0x11,
00022 OWNER_END,
00023 INVALID_OWNER = 0xFF,
00024 INVALID_PLAYER = 0xFF,
00025
00026
00027 PLAYER_INACTIVE_CLIENT = 253,
00028 PLAYER_NEW_COMPANY = 254,
00029 PLAYER_SPECTATOR = 255,
00030 };
00031 DECLARE_POSTFIX_INCREMENT(Owner);
00032
00033 enum {
00034 MAX_LENGTH_PRESIDENT_NAME = 31,
00035 MAX_LENGTH_COMPANY_NAME = 31,
00036 };
00037
00039 template <> struct EnumPropsT<Owner> : MakeEnumPropsT<Owner, byte, OWNER_BEGIN, OWNER_END, INVALID_OWNER> {};
00040 typedef TinyEnumT<Owner> OwnerByte;
00041
00042 typedef Owner PlayerID;
00043 typedef OwnerByte PlayerByte;
00044
00045 struct Player;
00046 typedef uint32 PlayerFace;
00047
00048 #endif