src/company_func.h
author translators
Thu, 27 Nov 2008 18:49:00 +0000
changeset 10388 ea6c13c8b6bc
parent 10225 eb61dd8101c1
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)
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
     1
/* $Id$ */
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
     2
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
     3
/** @file company_func.h Functions related to companies. */
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
     4
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
     5
#ifndef COMPANY_FUNC_H
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
     6
#define COMPANY_FUNC_H
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
     7
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
     8
#include "core/math_func.hpp"
10208
72c00af5c95d (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
rubidium
parents: 10207
diff changeset
     9
#include "company_type.h"
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    10
#include "tile_type.h"
8264
b1e85998c7d3 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents: 8254
diff changeset
    11
#include "strings_type.h"
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    12
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    13
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    14
void GetNameOfOwner(Owner owner, TileIndex tile);
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    15
void SetLocalCompany(CompanyID new_company);
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    16
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    17
extern CompanyByte _local_company;
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    18
extern CompanyByte _current_company;
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    19
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    20
extern byte _company_colours[MAX_COMPANIES];     ///< NOSAVE: can be determined from company structs
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    21
extern CompanyManagerFace _company_manager_face; ///< for company manager face storage in openttd.cfg
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    22
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    23
bool IsHumanCompany(CompanyID company);
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    24
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    25
static inline bool IsLocalCompany()
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    26
{
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    27
	return _local_company == _current_company;
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    28
}
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    29
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    30
static inline bool IsInteractiveCompany(CompanyID company)
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    31
{
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    32
	return company == _local_company;
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    33
}
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    34
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    35
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    36
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    37
struct HighScore {
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    38
	char company[100];
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    39
	StringID title; ///< NOSAVE, has troubles with changing string-numbers.
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    40
	uint16 score;   ///< do NOT change type, will break hs.dat
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    41
};
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    42
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    43
extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    44
void SaveToHighScore();
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    45
void LoadFromHighScore();
10225
eb61dd8101c1 (svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)
smatz
parents: 10208
diff changeset
    46
int8 SaveHighScoreValue(const Company *c);
8254
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    47
int8 SaveHighScoreValueNetwork();
1496654ca5e7 (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents:
diff changeset
    48
10207
c291a21b304e (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents: 9659
diff changeset
    49
#endif /* COMPANY_FUNC_H */