summaryrefslogtreecommitdiff
path: root/economy.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-28 17:40:15 +0000
committertruelight <truelight@openttd.org>2004-12-28 17:40:15 +0000
commite6a59be8c03998195cb87592231399fb5786234b (patch)
treefa334ac69546d4d32a85202264818ed9fd45b3f5 /economy.c
parentc4d073a4dedb9c8eca7b25a226703833b04c0266 (diff)
downloadopenttd-e6a59be8c03998195cb87592231399fb5786234b.tar.xz
(svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
after savegame bump)
Diffstat (limited to 'economy.c')
-rw-r--r--economy.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/economy.c b/economy.c
index 87bfcb551..04bd4d7c1 100644
--- a/economy.c
+++ b/economy.c
@@ -845,7 +845,7 @@ Pair SetupSubsidyDecodeParam(Subsidy *s, bool mode)
return tp;
}
-void DeleteSubsidyWithIndustry(byte index)
+void DeleteSubsidyWithIndustry(uint16 index)
{
Subsidy *s;
@@ -858,7 +858,7 @@ void DeleteSubsidyWithIndustry(byte index)
}
}
-void DeleteSubsidyWithStation(byte index)
+void DeleteSubsidyWithStation(uint16 index)
{
Subsidy *s;
bool dirty = false;
@@ -1062,8 +1062,10 @@ no_add:;
static const byte _subsidies_desc[] = {
SLE_VAR(Subsidy,cargo_type, SLE_UINT8),
SLE_VAR(Subsidy,age, SLE_UINT8),
- SLE_VAR(Subsidy,from, SLE_UINT8),
- SLE_VAR(Subsidy,to, SLE_UINT8),
+ SLE_CONDVAR(Subsidy,from, SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
+ SLE_CONDVAR(Subsidy,from, SLE_UINT16, 5, 255),
+ SLE_CONDVAR(Subsidy,to, SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
+ SLE_CONDVAR(Subsidy,to, SLE_UINT16, 5, 255),
SLE_END()
};