1
0
Fork 0

(svn r124) Prepared code for removal of block_months variable in next major savegame version

release/0.4.5
dominik 2004-08-23 21:29:25 +00:00
parent 4c0f46b5c7
commit 74852c4652
4 changed files with 7 additions and 5 deletions

View File

@ -106,7 +106,7 @@ typedef struct {
byte facilities; byte facilities;
byte airport_type; byte airport_type;
byte truck_stop_status, bus_stop_status; byte truck_stop_status, bus_stop_status;
byte blocked_months; byte blocked_months_obsolete;
byte unk85; byte unk85;
uint16 airport_flags; uint16 airport_flags;
uint16 last_vehicle; uint16 last_vehicle;
@ -708,7 +708,7 @@ static void FixStation(Station *s, OldStation *o, int num)
s->airport_type = o->airport_type; s->airport_type = o->airport_type;
s->truck_stop_status = o->truck_stop_status; s->truck_stop_status = o->truck_stop_status;
s->bus_stop_status = o->bus_stop_status; s->bus_stop_status = o->bus_stop_status;
s->blocked_months = o->blocked_months; s->blocked_months_obsolete = o->blocked_months_obsolete;
s->airport_flags = o->airport_flags; s->airport_flags = o->airport_flags;
s->last_vehicle = o->last_vehicle; s->last_vehicle = o->last_vehicle;
} while (s++,o++,--num); } while (s++,o++,--num);

View File

@ -37,7 +37,7 @@ struct Station {
byte airport_type; byte airport_type;
byte truck_stop_status; byte truck_stop_status;
byte bus_stop_status; byte bus_stop_status;
byte blocked_months; byte blocked_months_obsolete;
// trainstation width/height // trainstation width/height
byte trainst_w, trainst_h; byte trainst_w, trainst_h;

View File

@ -2510,7 +2510,9 @@ static const byte _station_desc[] = {
SLE_VAR(Station,airport_type, SLE_UINT8), SLE_VAR(Station,airport_type, SLE_UINT8),
SLE_VAR(Station,truck_stop_status, SLE_UINT8), SLE_VAR(Station,truck_stop_status, SLE_UINT8),
SLE_VAR(Station,bus_stop_status, SLE_UINT8), SLE_VAR(Station,bus_stop_status, SLE_UINT8),
SLE_VAR(Station,blocked_months, SLE_UINT8),
// blocked_months was stored here in savegame format 0 - 4.0
SLE_CONDVAR(Station,blocked_months_obsolete, SLE_UINT8, 0, 4),
SLE_CONDVAR(Station,airport_flags, SLE_VAR_U32 | SLE_FILE_U16, 0, 2), SLE_CONDVAR(Station,airport_flags, SLE_VAR_U32 | SLE_FILE_U16, 0, 2),
SLE_CONDVAR(Station,airport_flags, SLE_UINT32, 3, 255), SLE_CONDVAR(Station,airport_flags, SLE_UINT32, 3, 255),

2
ttd.c
View File

@ -1047,7 +1047,7 @@ void UpdateExclusiveRights()
t->exclusivity=(byte)-1; t->exclusivity=(byte)-1;
} }
/* FIXME old exclusive rights status is not being imported. /* FIXME old exclusive rights status is not being imported (stored in s->blocked_months_obsolete)
could be implemented this way: could be implemented this way:
1.) Go through all stations 1.) Go through all stations
Build an array town_blocked[ town_id ][ player_id ] Build an array town_blocked[ town_id ][ player_id ]