(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
This commit is contained in:
rubidium
2006-08-16 11:39:55 +00:00
parent 50e96f8ff9
commit 3cab5f30c0
32 changed files with 211 additions and 203 deletions

View File

@@ -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;
}