summaryrefslogtreecommitdiff
path: root/ttd.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-22 16:54:55 +0000
committerdominik <dominik@openttd.org>2004-12-22 16:54:55 +0000
commitb7f71b026d0da7cadb4db0ab674e0e2908227bce (patch)
tree185e746f2a0c7915cb636b6cc2d0c25d916eab2c /ttd.c
parent5c7decc27d7cf3aabbcff5172e67602c789a6db5 (diff)
downloadopenttd-b7f71b026d0da7cadb4db0ab674e0e2908227bce.tar.xz
(svn r1222) Currency cleanup. Changed some currency symbols according to forum suggestions (thx ChrisCF) and rearranged the currencies alphabetically (except for the major ones).
Diffstat (limited to 'ttd.c')
-rw-r--r--ttd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ttd.c b/ttd.c
index 3d7210bc8..725af1505 100644
--- a/ttd.c
+++ b/ttd.c
@@ -1185,6 +1185,19 @@ void UpdateExclusiveRights()
*/
}
+byte covert_currency[] = {
+ 0, 1, 12, 8, 3,
+ 10, 14, 19, 4, 5,
+ 9, 11, 13, 6, 17,
+ 16, 22, 21, 7, 15,
+ 18, 2, 20, };
+
+// since savegame version 4.2 the currencies are arranged differently
+void UpdateCurrencies()
+{
+ _opt.currency = covert_currency[_opt.currency];
+}
+
extern void UpdateOldAircraft();
bool AfterLoadGame(uint version)
@@ -1202,6 +1215,11 @@ bool AfterLoadGame(uint version)
UpdateExclusiveRights();
}
+ // from version 4.2 of the savegame, currencies are in a different order
+ if (version <= 0x401) {
+ UpdateCurrencies();
+ }
+
// convert road side to my format.
if (_opt.road_side) _opt.road_side = 1;