diff options
author | truelight <truelight@openttd.org> | 2004-12-28 17:40:15 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-28 17:40:15 +0000 |
commit | e6a59be8c03998195cb87592231399fb5786234b (patch) | |
tree | fa334ac69546d4d32a85202264818ed9fd45b3f5 /economy.c | |
parent | c4d073a4dedb9c8eca7b25a226703833b04c0266 (diff) | |
download | openttd-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.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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() }; |