Mercurial > hg > openttd
annotate src/unmovable.h @ 13626:0fcc5f6fa927 draft
(svn r18150) -Codechange: make the horizontal scrollbar scroll in the opposite direction with RTL
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 17 Nov 2009 18:45:57 +0000 |
parents | f2535c5098a0 |
children | 9a5050ee2cec |
rev | line source |
---|---|
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
2 |
12778
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11052
diff
changeset
|
3 /* |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11052
diff
changeset
|
4 * This file is part of OpenTTD. |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11052
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:
11052
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:
11052
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:
11052
diff
changeset
|
8 */ |
bc7926153e19
(svn r17248) -Fix: add GPL license notice where appropriate
rubidium <rubidium@openttd.org>
parents:
11052
diff
changeset
|
9 |
9111
d48433370037
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium <rubidium@openttd.org>
parents:
6423
diff
changeset
|
10 /** @file unmovable.h Functions related to unmovable objects. */ |
6423
72ac8bfaa32f
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas <belugas@openttd.org>
parents:
5475
diff
changeset
|
11 |
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
12 #ifndef UNMOVABLE_H |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
13 #define UNMOVABLE_H |
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
14 |
11010
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
15 #include "unmovable_map.h" |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
16 #include "economy_type.h" |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
17 #include "economy_func.h" |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
18 |
10207
c54d140df948
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium <rubidium@openttd.org>
parents:
9111
diff
changeset
|
19 void UpdateCompanyHQ(Company *c, uint score); |
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
20 |
11010
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
21 struct UnmovableSpec { |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
22 StringID name; |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
23 uint8 buy_cost_multiplier; |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
24 uint8 sell_cost_multiplier; |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
25 |
13486
f2535c5098a0
(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
frosch <frosch@openttd.org>
parents:
12778
diff
changeset
|
26 Money GetRemovalCost() const { return (_price[PR_CLEAR_ROUGH] * this->sell_cost_multiplier); } |
f2535c5098a0
(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
frosch <frosch@openttd.org>
parents:
12778
diff
changeset
|
27 Money GetBuildingCost() const { return (_price[PR_CLEAR_ROUGH] * this->buy_cost_multiplier); } |
11010
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
28 |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
29 }; |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
30 |
080a2d6125ed
(svn r15350) -Codechange: Create a spec array to hold the data definitions of unmovables objects.
belugas <belugas@openttd.org>
parents:
10207
diff
changeset
|
31 |
5475
eabf4b86aed6
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
32 #endif /* UNMOVABLE_H */ |