src/company_type.h
author translators
Thu, 27 Nov 2008 18:49:00 +0000
changeset 10388 ea6c13c8b6bc
parent 10208 72c00af5c95d
permissions -rw-r--r--
(svn r14639) -Update: WebTranslator2 update to 2008-11-27 18:48:40
brazilian_portuguese - 4 fixed by tucalipe (4)
catalan - 1 fixed by arnaullv (1)
dutch - 1 fixed, 7 changed by Excel20 (8)
finnish - 4 fixed by UltimateSephiroth (1), jpx_ (3)
french - 1 fixed by glx (1)
greek - 10 fixed by Dimi (10)
hungarian - 8 fixed, 49 changed by IPG (57)
italian - 1 fixed by lorenzodv (1)
japanese - 1 fixed, 41 changed by bve255 (42)
korean - 3 fixed by dlunch (3)
lithuanian - 99 fixed, 16 changed by Domas (115)
norwegian_nynorsk - 35 fixed, 1 changed by mkrwii (36)
persian - 38 fixed by ali sattari (38)
polish - 20 fixed by coolik (14), xaxa (6)
romanian - 8 fixed by stykat (8)
slovak - 1 fixed by James (1)
welsh - 2 fixed by welshdragon (2)
/* $Id$ */

/** @file company_type.h Types related to companies. */

#ifndef COMPANY_TYPE_H
#define COMPANY_TYPE_H

#include "core/enum_type.hpp"

/**
 * Enum for all companies/owners.
 */
enum Owner {
	/* All companies below MAX_COMPANIES are playable
	 * companies, above, they are special, computer controlled 'companies' */
	OWNER_BEGIN     = 0x00, ///< First owner
	COMPANY_FIRST   = 0x00, ///< First company, same as owner
	MAX_COMPANIES   = 0x08, ///< Maximum number of companies
	OWNER_TOWN      = 0x0F, ///< A town owns the tile, or a town is expanding
	OWNER_NONE      = 0x10, ///< The tile has no ownership
	OWNER_WATER     = 0x11, ///< The tile/execution is done by "water"
	OWNER_END,              ///< Last + 1 owner
	INVALID_OWNER   = 0xFF, ///< An invalid owner
	INVALID_COMPANY = 0xFF, ///< An invalid company

	/* 'Fake' companies used for networks */
	COMPANY_INACTIVE_CLIENT = 253, ///< The client is joining
	COMPANY_NEW_COMPANY     = 254, ///< The client wants a new company
	COMPANY_SPECTATOR       = 255, ///< The client is spectating
};
DECLARE_POSTFIX_INCREMENT(Owner);

enum {
	MAX_LENGTH_PRESIDENT_NAME_BYTES  =  31, ///< The maximum length of a president name in bytes including '\0'
	MAX_LENGTH_PRESIDENT_NAME_PIXELS =  94, ///< The maximum length of a president name in pixels
	MAX_LENGTH_COMPANY_NAME_BYTES    =  31, ///< The maximum length of a company name in bytes including '\0'
	MAX_LENGTH_COMPANY_NAME_PIXELS   = 150, ///< The maximum length of a company name in pixels
};

/** Define basic enum properties */
template <> struct EnumPropsT<Owner> : MakeEnumPropsT<Owner, byte, OWNER_BEGIN, OWNER_END, INVALID_OWNER> {};
typedef TinyEnumT<Owner> OwnerByte;

typedef Owner CompanyID;
typedef OwnerByte CompanyByte;

typedef uint8 CompanyMask;

struct Company;
typedef uint32 CompanyManagerFace; ///< Company manager face bits, info see in company_manager_face.h

#endif /* COMPANY_TYPE_H */