diff options
author | frosch <frosch@openttd.org> | 2009-11-08 12:23:02 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-11-08 12:23:02 +0000 |
commit | 3f5e42b04a552b6c1bf06b2bbd36e8bf9c7376bb (patch) | |
tree | c5c07837a657cef27ac79e3caa35248c665a2d1d /src/newgrf.cpp | |
parent | e781929d7f7d472bd400cc0d00407c97f469f841 (diff) | |
download | openttd-3f5e42b04a552b6c1bf06b2bbd36e8bf9c7376bb.tar.xz |
(svn r18008) -Codechange: Rename NUM_PRICES to PR_END, and use the Price enum some more.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 21412ef95..fc38c2b9b 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -435,7 +435,7 @@ static void ConvertTTDBasePrice(uint32 base_pointer, const char *error_location, static const uint32 start = 0x4B34; ///< Position of first base price static const uint32 size = 6; ///< Size of each base price record - if (base_pointer < start || (base_pointer - start) % size != 0 || (base_pointer - start) / size >= NUM_PRICES) { + if (base_pointer < start || (base_pointer - start) % size != 0 || (base_pointer - start) / size >= PR_END) { grfmsg(1, "%s: Unsupported running cost base 0x%04X, ignoring", error_location, base_pointer); return; } @@ -1668,8 +1668,8 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, by byte factor = grf_load_byte(&buf); uint price = gvid + i; - if (price < NUM_PRICES) { - SetPriceBaseMultiplier(price, factor); + if (price < PR_END) { + SetPriceBaseMultiplier((Price)price, factor); } else { grfmsg(1, "GlobalVarChangeInfo: Price %d out of range, ignoring", price); } |