summaryrefslogtreecommitdiff
path: root/src/rail.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-11-07 22:47:54 +0000
committerfrosch <frosch@openttd.org>2009-11-07 22:47:54 +0000
commitba1fc280e3b0c13baedc2ef54dabb2deec41c818 (patch)
treef8f51f5d18355d9205052bad2e90e068e9bfacb6 /src/rail.h
parent7984d90c40f4d55cad9f34d0acac27beb701a63a (diff)
downloadopenttd-ba1fc280e3b0c13baedc2ef54dabb2deec41c818.tar.xz
(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
Diffstat (limited to 'src/rail.h')
-rw-r--r--src/rail.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail.h b/src/rail.h
index 27b25895d..ae19c97c1 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -194,7 +194,7 @@ static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
static inline Money RailBuildCost(RailType railtype)
{
assert(railtype < RAILTYPE_END);
- return (_price.build_rail * GetRailTypeInfo(railtype)->cost_multiplier) >> 3;
+ return (_price[PR_BUILD_RAIL] * GetRailTypeInfo(railtype)->cost_multiplier) >> 3;
}
/**
@@ -224,7 +224,7 @@ static inline Money RailConvertCost(RailType from, RailType to)
}
/* make the price the same as remove + build new type */
- return RailBuildCost(to) + _price.remove_rail;
+ return RailBuildCost(to) + _price[PR_CLEAR_RAIL];
}
Vehicle *UpdateTrainPowerProc(Vehicle *v, void *data);