author | ludde |
Mon, 01 Aug 2005 16:31:19 +0000 | |
changeset 2261 | 3f78323707bb |
parent 2186 | 461a2aff3486 |
child 2506 | 777ac2d9a98a |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
0 | 3 |
#ifndef ECONOMY_H |
4 |
#define ECONOMY_H |
|
5 |
||
6 |
typedef struct { |
|
7 |
// Maximum possible loan |
|
8 |
int32 max_loan; |
|
9 |
int32 max_loan_unround; |
|
10 |
// Economy fluctuation status |
|
11 |
int fluct; |
|
12 |
// Interest |
|
13 |
byte interest_rate; |
|
14 |
byte infl_amount; |
|
15 |
byte infl_amount_pr; |
|
16 |
} Economy; |
|
17 |
||
18 |
VARDEF Economy _economy; |
|
19 |
||
20 |
typedef struct Subsidy { |
|
21 |
byte cargo_type; |
|
22 |
byte age; |
|
820
9d311999f866
(svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
truelight
parents:
240
diff
changeset
|
23 |
uint16 from; |
9d311999f866
(svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
truelight
parents:
240
diff
changeset
|
24 |
uint16 to; |
0 | 25 |
} Subsidy; |
26 |
||
27 |
||
116
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
28 |
enum { |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
29 |
SCORE_VEHICLES = 0, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
30 |
SCORE_STATIONS = 1, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
31 |
SCORE_MIN_PROFIT = 2, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
32 |
SCORE_MIN_INCOME = 3, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
33 |
SCORE_MAX_INCOME = 4, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
34 |
SCORE_DELIVERED = 5, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
35 |
SCORE_CARGO = 6, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
36 |
SCORE_MONEY = 7, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
37 |
SCORE_LOAN = 8, |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
38 |
SCORE_TOTAL = 9, // This must always be the last entry |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
39 |
|
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
40 |
NUM_SCORE = 10, // How many scores are there.. |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
179
diff
changeset
|
41 |
|
116
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
42 |
SCORE_MAX = 1000, // The max score that can be in the performance history |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
43 |
// the scores together of score_info is allowed to be more! |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
44 |
}; |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
45 |
|
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
46 |
typedef struct ScoreInfo { |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
47 |
byte id; // Unique ID of the score |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
48 |
int needed; // How much you need to get the perfect score |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
49 |
int score; // How much score it will give |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
50 |
} ScoreInfo; |
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
51 |
|
2261
3f78323707bb
(svn r2781) Fix some of the issues with variables in .h files.
ludde
parents:
2186
diff
changeset
|
52 |
extern const ScoreInfo _score_info[]; |
3f78323707bb
(svn r2781) Fix some of the issues with variables in .h files.
ludde
parents:
2186
diff
changeset
|
53 |
extern int _score_part[MAX_PLAYERS][NUM_SCORE]; |
116
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
54 |
|
147
d0c8100d18cf
(svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
darkvater
parents:
116
diff
changeset
|
55 |
int UpdateCompanyRatingAndValue(Player *p, bool update); |
d0c8100d18cf
(svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
darkvater
parents:
116
diff
changeset
|
56 |
void UpdatePlayerHouse(Player *p, uint score); |
116
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
57 |
|
ca4332a9ec1d
(svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents:
0
diff
changeset
|
58 |
|
0 | 59 |
VARDEF Subsidy _subsidies[MAX_PLAYERS]; |
60 |
Pair SetupSubsidyDecodeParam(Subsidy *s, bool mode); |
|
820
9d311999f866
(svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
truelight
parents:
240
diff
changeset
|
61 |
void DeleteSubsidyWithIndustry(uint16 index); |
9d311999f866
(svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
truelight
parents:
240
diff
changeset
|
62 |
void DeleteSubsidyWithStation(uint16 index); |
240 | 63 |
void RemoteSubsidyAdd(Subsidy *s_new); |
0 | 64 |
|
65 |
int32 GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, byte cargo_type); |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
820
diff
changeset
|
66 |
uint MoveGoodsToStation(TileIndex tile, int w, int h, int type, uint amount); |
0 | 67 |
|
68 |
#endif /* ECONOMY_H */ |