src/company_func.h
author translators
Tue, 09 Dec 2008 18:44:51 +0000
changeset 10412 3e8639ed3eba
parent 10225 eb61dd8101c1
permissions -rw-r--r--
(svn r14665) -Update: WebTranslator2 update to 2008-12-09 18:44:40
arabic_egypt - 301 fixed by khaloofah (301)
esperanto - 64 fixed, 2 changed by alekcxjo (66)
hebrew - 430 fixed by moshe (430)
hungarian - 10 changed by alyr (9), oklmernok (1)
indonesian - 49 fixed, 4 changed by fanioz (40), anansboga (13)
lithuanian - 5 fixed by Enternald (5)
portuguese - 6 fixed by SnowFlake (6)
thai - 333 fixed by vetbook (333)
/* $Id$ */

/** @file company_func.h Functions related to companies. */

#ifndef COMPANY_FUNC_H
#define COMPANY_FUNC_H

#include "core/math_func.hpp"
#include "company_type.h"
#include "tile_type.h"
#include "strings_type.h"

void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
void GetNameOfOwner(Owner owner, TileIndex tile);
void SetLocalCompany(CompanyID new_company);

extern CompanyByte _local_company;
extern CompanyByte _current_company;

extern byte _company_colours[MAX_COMPANIES];     ///< NOSAVE: can be determined from company structs
extern CompanyManagerFace _company_manager_face; ///< for company manager face storage in openttd.cfg

bool IsHumanCompany(CompanyID company);

static inline bool IsLocalCompany()
{
	return _local_company == _current_company;
}

static inline bool IsInteractiveCompany(CompanyID company)
{
	return company == _local_company;
}



struct HighScore {
	char company[100];
	StringID title; ///< NOSAVE, has troubles with changing string-numbers.
	uint16 score;   ///< do NOT change type, will break hs.dat
};

extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
void SaveToHighScore();
void LoadFromHighScore();
int8 SaveHighScoreValue(const Company *c);
int8 SaveHighScoreValueNetwork();

#endif /* COMPANY_FUNC_H */