2008-01-12 14:10:35 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
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);
|
2009-09-01 12:57:04 +00:00
|
|
|
void ShowBuyCompanyDialog(CompanyID 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
|
|
|
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 */
|