diff options
author | rubidium <rubidium@openttd.org> | 2006-08-16 11:39:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-08-16 11:39:55 +0000 |
commit | 3cab5f30c06035034bcf5b513c2eee57b8ec11e9 (patch) | |
tree | 90102c4cf1f03e52dfe00d3cd1315b6cd9e6b399 /newgrf.c | |
parent | 50e96f8ff92bad28741ca3d360a4e7366072748d (diff) | |
download | openttd-3cab5f30c06035034bcf5b513c2eee57b8ec11e9.tar.xz |
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
Diffstat (limited to 'newgrf.c')
-rw-r--r-- | newgrf.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -23,6 +23,7 @@ #include "vehicle.h" #include "newgrf_text.h" #include "table/sprites.h" +#include "date.h" #include "newgrf_spritegroup.h" @@ -1006,7 +1007,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int switch (prop) { case 0x08: /* Year of availability */ - FOR_EACH_OBJECT _bridge[brid + i].avail_year = grf_load_byte(&buf); + FOR_EACH_OBJECT _bridge[brid + i].avail_year = BASE_YEAR + grf_load_byte(&buf); break; case 0x09: /* Minimum length */ @@ -1059,6 +1060,10 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int FOR_EACH_OBJECT _bridge[brid + i].flags = grf_load_byte(&buf); break; + case 0x0F: /* Long year -- must be set after property 8 */ + FOR_EACH_OBJECT _bridge[brid + i].avail_year = grf_load_word(&buf); + break; + default: ret = true; } |