From d1bb5e5f3632ada5336cd0408e11a6d17f43a5b7 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 24 Dec 2008 09:53:15 +0000 Subject: (svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous. -Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste. --- src/company_type.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/company_type.h') diff --git a/src/company_type.h b/src/company_type.h index 13ea10c48..997cc40a1 100644 --- a/src/company_type.h +++ b/src/company_type.h @@ -15,7 +15,7 @@ enum Owner { * 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 + MAX_COMPANIES = 0x0F, ///< 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" @@ -44,7 +44,7 @@ typedef TinyEnumT OwnerByte; typedef Owner CompanyID; typedef OwnerByte CompanyByte; -typedef uint8 CompanyMask; +typedef uint16 CompanyMask; struct Company; typedef uint32 CompanyManagerFace; ///< Company manager face bits, info see in company_manager_face.h -- cgit v1.2.3-54-g00ecf