(svn r20311) -Codechange: don't reserve extra space in the savegame that is never used

This commit is contained in:
yexo 2010-08-02 18:24:09 +00:00
parent 9b9d8088b0
commit dff871b40d
5 changed files with 12 additions and 23 deletions

View File

@ -160,8 +160,7 @@ static const SaveLoad _company_settings_desc[] = {
SLE_CONDVAR(Company, settings.vehicle.servint_aircraft, SLE_UINT16, 120, SL_MAX_VERSION),
SLE_CONDVAR(Company, settings.vehicle.servint_ships, SLE_UINT16, 120, SL_MAX_VERSION),
/* Reserve extra space in savegame here. (currently 63 bytes) */
SLE_CONDNULL(63, 2, SL_MAX_VERSION),
SLE_CONDNULL(63, 2, 143), // old reserved space
SLE_END()
};
@ -183,8 +182,7 @@ static const SaveLoad _company_settings_skip_desc[] = {
SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_aircraft
SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_ships
/* Reserve extra space in savegame here. (currently 63 bytes) */
SLE_CONDNULL(63, 2, SL_MAX_VERSION),
SLE_CONDNULL(63, 2, 143), // old reserved space
SLE_END()
};

View File

@ -35,7 +35,7 @@ static void Load_CAPR()
static const SaveLoad _economy_desc[] = {
SLE_CONDNULL(4, 0, 64), // max_loan
SLE_CONDNULL(8, 65, SL_MAX_VERSION), // max_loan
SLE_CONDNULL(8, 65, 143), // max_loan
SLE_CONDVAR(Economy, old_max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, 0, 64),
SLE_CONDVAR(Economy, old_max_loan_unround, SLE_INT64, 65, 125),
SLE_CONDVAR(Economy, old_max_loan_unround_fract, SLE_UINT16, 70, 125),

View File

@ -37,8 +37,7 @@ static const SaveLoad _engine_desc[] = {
SLE_CONDVAR(Engine, company_avail, SLE_UINT16, 104, SL_MAX_VERSION),
SLE_CONDSTR(Engine, name, SLE_STR, 0, 84, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 16 bytes) */
SLE_CONDNULL(16, 2, SL_MAX_VERSION),
SLE_CONDNULL(16, 2, 143), // old reserved space
SLE_END()
};

View File

@ -55,8 +55,7 @@ static const SaveLoad _industry_desc[] = {
SLE_CONDVAR(Industry, random_triggers, SLE_UINT8, 82, SL_MAX_VERSION),
SLE_CONDVAR(Industry, random, SLE_UINT16, 82, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 32 bytes) */
SLE_CONDNULL(32, 2, SL_MAX_VERSION),
SLE_CONDNULL(32, 2, 143), // old reserved space
SLE_END()
};

View File

@ -526,8 +526,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDVAR(Vehicle, current_order_time, SLE_UINT32, 67, SL_MAX_VERSION),
SLE_CONDVAR(Vehicle, lateness_counter, SLE_INT32, 67, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 10 bytes) */
SLE_CONDNULL(10, 2, SL_MAX_VERSION),
SLE_CONDNULL(10, 2, 143), // old reserved space
SLE_END()
};
@ -549,8 +548,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDNULL(2, 2, 19),
SLE_CONDVAR(Train, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 11 bytes) */
SLE_CONDNULL(11, 2, SL_MAX_VERSION),
SLE_CONDNULL(11, 2, 143), // old reserved space
SLE_END()
};
@ -570,8 +568,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDVAR(RoadVehicle, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION),
SLE_CONDNULL(4, 69, 130),
SLE_CONDNULL(2, 6, 130),
/* reserve extra space in savegame here. (currently 16 bytes) */
SLE_CONDNULL(16, 2, SL_MAX_VERSION),
SLE_CONDNULL(16, 2, 143), // old reserved space
SLE_END()
};
@ -581,8 +578,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_VEH_INCLUDE(),
SLE_VAR(Ship, state, SLE_UINT8),
/* reserve extra space in savegame here. (currently 16 bytes) */
SLE_CONDNULL(16, 2, SL_MAX_VERSION),
SLE_CONDNULL(16, 2, 143), // old reserved space
SLE_END()
};
@ -604,8 +600,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDVAR(Aircraft, turn_counter, SLE_UINT8, 136, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 13 bytes) */
SLE_CONDNULL(13, 2, SL_MAX_VERSION),
SLE_CONDNULL(13, 2, 143), // old reserved space
SLE_END()
};
@ -634,8 +629,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDVAR(Vehicle, spritenum, SLE_UINT8, 2, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 15 bytes) */
SLE_CONDNULL(15, 2, SL_MAX_VERSION),
SLE_CONDNULL(15, 2, 143), // old reserved space
SLE_END()
};
@ -672,8 +666,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_VAR(DisasterVehicle, image_override, SLE_UINT16),
SLE_VAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT16),
/* reserve extra space in savegame here. (currently 16 bytes) */
SLE_CONDNULL(16, 2, SL_MAX_VERSION),
SLE_CONDNULL(16, 2, 143), // old reserved space
SLE_END()
};