summaryrefslogtreecommitdiff
path: root/economy.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-05-30 22:16:05 +0000
committerDarkvater <Darkvater@openttd.org>2005-05-30 22:16:05 +0000
commitf4f5cb93f8e353148baa5e06044f5bc9c5e3bba6 (patch)
treea128ca9df2fa6efee823ebaf238898eddb20617b /economy.c
parentedf7a3be82add693536ae5eedd980e65c94f3449 (diff)
downloadopenttd-f4f5cb93f8e353148baa5e06044f5bc9c5e3bba6.tar.xz
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
Diffstat (limited to 'economy.c')
-rw-r--r--economy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/economy.c b/economy.c
index ccee21343..bd42320f3 100644
--- a/economy.c
+++ b/economy.c
@@ -1065,7 +1065,7 @@ no_add:;
InvalidateWindow(WC_SUBSIDIES_LIST, 0);
}
-static const byte _subsidies_desc[] = {
+static const SaveLoad _subsidies_desc[] = {
SLE_VAR(Subsidy,cargo_type, SLE_UINT8),
SLE_VAR(Subsidy,age, SLE_UINT8),
SLE_CONDVAR(Subsidy,from, SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
@@ -1650,7 +1650,7 @@ static void SaveLoad_CAPR(void)
SlArray(&_cargo_payment_rates_frac, NUM_CARGO, SLE_UINT16);
}
-static const byte _economy_desc[] = {
+static const SaveLoad _economy_desc[] = {
SLE_VAR(Economy,max_loan, SLE_INT32),
SLE_VAR(Economy,max_loan_unround, SLE_INT32),
SLE_VAR(Economy,fluct, SLE_FILE_I16 | SLE_VAR_I32),
@@ -1663,7 +1663,7 @@ static const byte _economy_desc[] = {
// Economy variables
static void SaveLoad_ECMY(void)
{
- SlObject(&_economy, &_economy_desc);
+ SlObject(&_economy, _economy_desc);
}
const ChunkHandler _economy_chunk_handlers[] = {