2008-01-12 14:10:35 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
/** @file company_func.h Functions related to companies. */
|
2008-01-12 14:10:35 +00:00
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
#ifndef COMPANY_FUNC_H
|
|
|
|
#define COMPANY_FUNC_H
|
2008-01-12 14:10:35 +00:00
|
|
|
|
|
|
|
#include "core/math_func.hpp"
|
2008-09-30 20:51:04 +00:00
|
|
|
#include "company_type.h"
|
2008-01-12 14:10:35 +00:00
|
|
|
#include "tile_type.h"
|
2008-01-13 01:21:35 +00:00
|
|
|
#include "strings_type.h"
|
2009-02-09 01:06:23 +00:00
|
|
|
#include "gfx_type.h"
|
2008-01-12 14:10:35 +00:00
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
|
2008-01-12 14:10:35 +00:00
|
|
|
void GetNameOfOwner(Owner owner, TileIndex tile);
|
2008-09-30 20:39:50 +00:00
|
|
|
void SetLocalCompany(CompanyID new_company);
|
2008-01-12 14:10:35 +00:00
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
extern CompanyByte _local_company;
|
|
|
|
extern CompanyByte _current_company;
|
2008-01-12 14:10:35 +00:00
|
|
|
|
2009-02-09 01:06:23 +00:00
|
|
|
extern Colours _company_colours[MAX_COMPANIES]; ///< NOSAVE: can be determined from company structs
|
2008-09-30 20:39:50 +00:00
|
|
|
extern CompanyManagerFace _company_manager_face; ///< for company manager face storage in openttd.cfg
|
2008-01-12 14:10:35 +00:00
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
bool IsHumanCompany(CompanyID company);
|
|
|
|
|
|
|
|
static inline bool IsLocalCompany()
|
2008-01-12 14:10:35 +00:00
|
|
|
{
|
2008-09-30 20:39:50 +00:00
|
|
|
return _local_company == _current_company;
|
2008-01-12 14:10:35 +00:00
|
|
|
}
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
static inline bool IsInteractiveCompany(CompanyID company)
|
2008-01-12 14:10:35 +00:00
|
|
|
{
|
2008-09-30 20:39:50 +00:00
|
|
|
return company == _local_company;
|
2008-01-12 14:10:35 +00:00
|
|
|
}
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
#endif /* COMPANY_FUNC_H */
|