Mercurial > hg > openttd
annotate src/subsidy_func.h @ 13752:517d77f53919 draft
(svn r18277) -Codechange: remove unneeded widget indices for close, resize and sticky boxes and for window captions
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 24 Nov 2009 18:05:55 +0000 |
parents | bc7926153e19 |
children | a899d4e5ee1a |
rev | line source |
---|---|
11997
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
2 |
12778
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
3 /* |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
4 * This file is part of OpenTTD. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
5 * 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. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
6 * 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. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
7 * 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/>. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
8 */ |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
12658
diff
changeset
|
9 |
11997
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
10 /** @file subsidy_func.h Functions related to subsidies. */ |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
11 |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
12 #ifndef SUBSIDY_FUNC_H |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
13 #define SUBSIDY_FUNC_H |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
14 |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
15 #include "core/geometry_type.hpp" |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
16 #include "station_type.h" |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
17 #include "town_type.h" |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
18 #include "industry_type.h" |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
19 #include "company_type.h" |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
20 |
12297
39ea618c207e
(svn r16714) -Codechange: use pool-like accessors for Subsidy
smatz <smatz@openttd.org>
parents:
12289
diff
changeset
|
21 Pair SetupSubsidyDecodeParam(const struct Subsidy *s, bool mode); |
12652
0f7fab6a27e9
(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed
smatz <smatz@openttd.org>
parents:
12297
diff
changeset
|
22 void DeleteSubsidyWith(SourceType type, SourceID index); |
12658
b75d8c6681bd
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
smatz <smatz@openttd.org>
parents:
12652
diff
changeset
|
23 bool CheckSubsidised(CargoID cargo_type, CompanyID company, SourceType src_type, SourceID src, const Station *st); |
11997
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
24 void SubsidyMonthlyHandler(); |
12658
b75d8c6681bd
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
smatz <smatz@openttd.org>
parents:
12652
diff
changeset
|
25 void RebuildSubsidisedSourceAndDestinationCache(); |
b75d8c6681bd
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
smatz <smatz@openttd.org>
parents:
12652
diff
changeset
|
26 void DeleteSubsidy(struct Subsidy *s); |
11997
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
27 |
e2187548a5e4
(svn r16403) -Codechange: move code related to subsidies to separate file
smatz <smatz@openttd.org>
parents:
diff
changeset
|
28 #endif /* SUBSIDY_FUNC_H */ |