diff options
author | Darkvater <darkvater@openttd.org> | 2006-02-20 19:43:26 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-02-20 19:43:26 +0000 |
commit | 45e85d2eb2f3c0989bdcb746be2460a60d235273 (patch) | |
tree | ed77a71f5446c2a70d26f0045fb2341b38b84ebf /players.c | |
parent | fa337ae64a554ae77fed3dfb1147acc7890e77ca (diff) | |
download | openttd-45e85d2eb2f3c0989bdcb746be2460a60d235273.tar.xz |
(svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION
Diffstat (limited to 'players.c')
-rw-r--r-- | players.c | 48 |
1 files changed, 24 insertions, 24 deletions
@@ -1117,7 +1117,7 @@ static const SaveLoad _player_desc[] = { // money was changed to a 64 bit field in savegame version 1. SLE_CONDVAR(Player,money64, SLE_VAR_I64 | SLE_FILE_I32, 0, 0), - SLE_CONDVAR(Player,money64, SLE_INT64, 1, 255), + SLE_CONDVAR(Player,money64, SLE_INT64, 1, SL_MAX_VERSION), SLE_VAR(Player,current_loan, SLE_INT32), @@ -1128,9 +1128,9 @@ static const SaveLoad _player_desc[] = { SLE_VAR(Player,cargo_types, SLE_UINT16), SLE_CONDVAR(Player, location_of_house, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Player, location_of_house, SLE_UINT32, 6, 255), + SLE_CONDVAR(Player, location_of_house, SLE_UINT32, 6, SL_MAX_VERSION), SLE_CONDVAR(Player, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(Player, last_build_coordinate, SLE_UINT32, 6, 255), + SLE_CONDVAR(Player, last_build_coordinate, SLE_UINT32, 6, SL_MAX_VERSION), SLE_VAR(Player,inaugurated_year,SLE_UINT8), SLE_ARR(Player,share_owners, SLE_UINT8, 4), @@ -1144,22 +1144,22 @@ static const SaveLoad _player_desc[] = { // yearly expenses was changed to 64-bit in savegame version 2. SLE_CONDARR(Player,yearly_expenses, SLE_FILE_I32|SLE_VAR_I64, 3*13, 0, 1), - SLE_CONDARR(Player,yearly_expenses, SLE_INT64, 3*13, 2, 255), + SLE_CONDARR(Player,yearly_expenses, SLE_INT64, 3*13, 2, SL_MAX_VERSION), - SLE_CONDVAR(Player,is_ai, SLE_UINT8, 2, 255), - SLE_CONDVAR(Player,is_active, SLE_UINT8, 4, 255), + SLE_CONDVAR(Player,is_ai, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_CONDVAR(Player,is_active, SLE_UINT8, 4, SL_MAX_VERSION), // Engine renewal settings SLE_CONDARR(NullStruct,null,SLE_FILE_U16 | SLE_VAR_NULL, 256, 16, 18), - SLE_CONDREF(Player,engine_renew_list, REF_ENGINE_RENEWS, 19, 255), - SLE_CONDVAR(Player,engine_renew, SLE_UINT8, 16, 255), - SLE_CONDVAR(Player,engine_renew_months, SLE_INT16, 16, 255), - SLE_CONDVAR(Player,engine_renew_money, SLE_UINT32, 16, 255), - SLE_CONDVAR(Player,renew_keep_length, SLE_UINT8, 2, 255), // added with 16.1, but was blank since 2 + SLE_CONDREF(Player,engine_renew_list, REF_ENGINE_RENEWS, 19, SL_MAX_VERSION), + SLE_CONDVAR(Player,engine_renew, SLE_UINT8, 16, SL_MAX_VERSION), + SLE_CONDVAR(Player,engine_renew_months, SLE_INT16, 16, SL_MAX_VERSION), + SLE_CONDVAR(Player,engine_renew_money, SLE_UINT32, 16, SL_MAX_VERSION), + SLE_CONDVAR(Player,renew_keep_length, SLE_UINT8, 2, SL_MAX_VERSION), // added with 16.1, but was blank since 2 // reserve extra space in savegame here. (currently 63 bytes) - SLE_CONDARR(NullStruct,null,SLE_FILE_U8 | SLE_VAR_NULL, 7, 2, 255), - SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 7, 2, 255), + SLE_CONDARR(NullStruct,null,SLE_FILE_U8 | SLE_VAR_NULL, 7, 2, SL_MAX_VERSION), + SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 7, 2, SL_MAX_VERSION), SLE_END() }; @@ -1169,9 +1169,9 @@ static const SaveLoad _player_economy_desc[] = { SLE_CONDVAR(PlayerEconomyEntry,income, SLE_INT32, 0, 1), SLE_CONDVAR(PlayerEconomyEntry,expenses, SLE_INT32, 0, 1), SLE_CONDVAR(PlayerEconomyEntry,company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), - SLE_CONDVAR(PlayerEconomyEntry,income, SLE_FILE_I64 | SLE_VAR_I32, 2, 255), - SLE_CONDVAR(PlayerEconomyEntry,expenses,SLE_FILE_I64 | SLE_VAR_I32, 2, 255), - SLE_CONDVAR(PlayerEconomyEntry,company_value, SLE_INT64, 2, 255), + SLE_CONDVAR(PlayerEconomyEntry,income, SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION), + SLE_CONDVAR(PlayerEconomyEntry,expenses,SLE_FILE_I64 | SLE_VAR_I32, 2, SL_MAX_VERSION), + SLE_CONDVAR(PlayerEconomyEntry,company_value, SLE_INT64, 2, SL_MAX_VERSION), SLE_VAR(PlayerEconomyEntry,delivered_cargo, SLE_INT32), SLE_VAR(PlayerEconomyEntry,performance_history, SLE_INT32), @@ -1183,7 +1183,7 @@ static const SaveLoad _player_ai_desc[] = { SLE_VAR(PlayerAI,state, SLE_UINT8), SLE_VAR(PlayerAI,tick, SLE_UINT8), SLE_CONDVAR(PlayerAI,state_counter, SLE_FILE_U16 | SLE_VAR_U32, 0, 12), - SLE_CONDVAR(PlayerAI,state_counter, SLE_UINT32, 13, 255), + SLE_CONDVAR(PlayerAI,state_counter, SLE_UINT32, 13, SL_MAX_VERSION), SLE_VAR(PlayerAI,timeout_counter, SLE_UINT16), SLE_VAR(PlayerAI,state_mode, SLE_UINT8), @@ -1200,16 +1200,16 @@ static const SaveLoad _player_ai_desc[] = { SLE_VAR(PlayerAI,route_type_mask, SLE_UINT8), SLE_CONDVAR(PlayerAI, start_tile_a, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, start_tile_a, SLE_UINT32, 6, 255), + SLE_CONDVAR(PlayerAI, start_tile_a, SLE_UINT32, 6, SL_MAX_VERSION), SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_UINT32, 6, 255), + SLE_CONDVAR(PlayerAI, cur_tile_a, SLE_UINT32, 6, SL_MAX_VERSION), SLE_VAR(PlayerAI,start_dir_a, SLE_UINT8), SLE_VAR(PlayerAI,cur_dir_a, SLE_UINT8), SLE_CONDVAR(PlayerAI, start_tile_b, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, start_tile_b, SLE_UINT32, 6, 255), + SLE_CONDVAR(PlayerAI, start_tile_b, SLE_UINT32, 6, SL_MAX_VERSION), SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_UINT32, 6, 255), + SLE_CONDVAR(PlayerAI, cur_tile_b, SLE_UINT32, 6, SL_MAX_VERSION), SLE_VAR(PlayerAI,start_dir_b, SLE_UINT8), SLE_VAR(PlayerAI,cur_dir_b, SLE_UINT8), @@ -1219,15 +1219,15 @@ static const SaveLoad _player_ai_desc[] = { SLE_ARR(PlayerAI,order_list_blocks, SLE_UINT8, 20), SLE_ARR(PlayerAI,banned_tiles, SLE_UINT16, 16), - SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 8, 2, 255), + SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 8, 2, SL_MAX_VERSION), SLE_END() }; static const SaveLoad _player_ai_build_rec_desc[] = { SLE_CONDVAR(AiBuildRec,spec_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(AiBuildRec,spec_tile, SLE_UINT32, 6, 255), + SLE_CONDVAR(AiBuildRec,spec_tile, SLE_UINT32, 6, SL_MAX_VERSION), SLE_CONDVAR(AiBuildRec,use_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), - SLE_CONDVAR(AiBuildRec,use_tile, SLE_UINT32, 6, 255), + SLE_CONDVAR(AiBuildRec,use_tile, SLE_UINT32, 6, SL_MAX_VERSION), SLE_VAR(AiBuildRec,rand_rng, SLE_UINT8), SLE_VAR(AiBuildRec,cur_building_rule,SLE_UINT8), SLE_VAR(AiBuildRec,unk6, SLE_UINT8), |