company_type.h

Go to the documentation of this file.
00001 /* $Id: company_type.h 15903 2009-03-30 23:15:05Z rubidium $ */
00002 
00005 #ifndef COMPANY_TYPE_H
00006 #define COMPANY_TYPE_H
00007 
00008 #include "core/enum_type.hpp"
00009 
00013 enum Owner {
00014   /* All companies below MAX_COMPANIES are playable
00015    * companies, above, they are special, computer controlled 'companies' */
00016   OWNER_BEGIN     = 0x00, 
00017   COMPANY_FIRST   = 0x00, 
00018   MAX_COMPANIES   = 0x0F, 
00019   OWNER_TOWN      = 0x0F, 
00020   OWNER_NONE      = 0x10, 
00021   OWNER_WATER     = 0x11, 
00022   OWNER_END,              
00023   INVALID_OWNER   = 0xFF, 
00024   INVALID_COMPANY = 0xFF, 
00025 
00026   /* 'Fake' companies used for networks */
00027   COMPANY_INACTIVE_CLIENT = 253, 
00028   COMPANY_NEW_COMPANY     = 254, 
00029   COMPANY_SPECTATOR       = 255, 
00030 };
00031 DECLARE_POSTFIX_INCREMENT(Owner);
00032 
00033 enum {
00034   MAX_LENGTH_PRESIDENT_NAME_BYTES  =  31, 
00035   MAX_LENGTH_PRESIDENT_NAME_PIXELS =  94, 
00036   MAX_LENGTH_COMPANY_NAME_BYTES    =  31, 
00037   MAX_LENGTH_COMPANY_NAME_PIXELS   = 150, 
00038 };
00039 
00041 template <> struct EnumPropsT<Owner> : MakeEnumPropsT<Owner, byte, OWNER_BEGIN, OWNER_END, INVALID_OWNER> {};
00042 typedef TinyEnumT<Owner> OwnerByte;
00043 
00044 typedef Owner CompanyID;
00045 typedef OwnerByte CompanyByte;
00046 
00047 typedef uint16 CompanyMask;
00048 
00049 struct Company;
00050 typedef uint32 CompanyManagerFace; 
00051 
00052 #endif /* COMPANY_TYPE_H */

Generated on Sun Nov 15 15:40:10 2009 for OpenTTD by  doxygen 1.5.6