summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-05-30 22:16:05 +0000
committerDarkvater <darkvater@openttd.org>2005-05-30 22:16:05 +0000
commit55423efb0687d937256d17ad267fce67ed9bf5cf (patch)
treea128ca9df2fa6efee823ebaf238898eddb20617b /players.c
parent628b1adbd24e1c0753e91030fb2080ca64340719 (diff)
downloadopenttd-55423efb0687d937256d17ad267fce67ed9bf5cf.tar.xz
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
Diffstat (limited to 'players.c')
-rw-r--r--players.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/players.c b/players.c
index fe0721846..17a4b54ee 100644
--- a/players.c
+++ b/players.c
@@ -951,7 +951,7 @@ void LoadFromHighScore(void)
}
// Save/load of players
-static const byte _player_desc[] = {
+static const SaveLoad _player_desc[] = {
SLE_VAR(Player,name_2, SLE_UINT32),
SLE_VAR(Player,name_1, SLE_STRINGID),
@@ -1000,7 +1000,7 @@ static const byte _player_desc[] = {
SLE_END()
};
-static const byte _player_economy_desc[] = {
+static const SaveLoad _player_economy_desc[] = {
// these were changed to 64-bit in savegame format 2
SLE_CONDVAR(PlayerEconomyEntry,income, SLE_INT32, 0, 1),
SLE_CONDVAR(PlayerEconomyEntry,expenses, SLE_INT32, 0, 1),
@@ -1015,7 +1015,7 @@ static const byte _player_economy_desc[] = {
SLE_END()
};
-static const byte _player_ai_desc[] = {
+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),
@@ -1059,7 +1059,7 @@ static const byte _player_ai_desc[] = {
SLE_END()
};
-static const byte _player_ai_build_rec_desc[] = {
+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,use_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),