summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-11-08 12:23:02 +0000
committerfrosch <frosch@openttd.org>2009-11-08 12:23:02 +0000
commit3f5e42b04a552b6c1bf06b2bbd36e8bf9c7376bb (patch)
treec5c07837a657cef27ac79e3caa35248c665a2d1d /src/saveload
parente781929d7f7d472bd400cc0d00407c97f469f841 (diff)
downloadopenttd-3f5e42b04a552b6c1bf06b2bbd36e8bf9c7376bb.tar.xz
(svn r18008) -Codechange: Rename NUM_PRICES to PR_END, and use the Price enum some more.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/economy_sl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/saveload/economy_sl.cpp b/src/saveload/economy_sl.cpp
index fccbb4bf3..cce2d7f2f 100644
--- a/src/saveload/economy_sl.cpp
+++ b/src/saveload/economy_sl.cpp
@@ -18,9 +18,10 @@
/** Prices in pre 126 savegames */
static void Load_PRIC()
{
+ /* Old games store 49 base prices, very old games store them as int32 */
int vt = CheckSavegameVersion(65) ? SLE_FILE_I32 : SLE_FILE_I64;
- SlArray(NULL, NUM_PRICES, vt | SLE_VAR_NULL);
- SlArray(NULL, NUM_PRICES, SLE_FILE_U16 | SLE_VAR_NULL);
+ SlArray(NULL, 49, vt | SLE_VAR_NULL);
+ SlArray(NULL, 49, SLE_FILE_U16 | SLE_VAR_NULL);
}
/** Cargo payment rates in pre 126 savegames */