diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-01-27 15:35:12 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-02-03 18:00:16 +0100 |
commit | faee0737e05c0eb42461b51807083ebc7078d2f5 (patch) | |
tree | c17adea2f97d241c9f82798303fdbce5ff5a2e3b /src | |
parent | 67c6f945fbfd4cb2c59788eea572a7954e4a2583 (diff) | |
download | openttd-faee0737e05c0eb42461b51807083ebc7078d2f5.tar.xz |
Codechange: Separate gamelog revision length from network revision length
Diffstat (limited to 'src')
-rw-r--r-- | src/gamelog_internal.h | 5 | ||||
-rw-r--r-- | src/saveload/gamelog_sl.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gamelog_internal.h b/src/gamelog_internal.h index ad9921f4e..261a8cd57 100644 --- a/src/gamelog_internal.h +++ b/src/gamelog_internal.h @@ -12,7 +12,6 @@ #ifndef GAMELOG_INTERNAL_H #define GAMELOG_INTERNAL_H -#include "network/core/config.h" #include "gamelog.h" /** Type of logged change */ @@ -33,6 +32,8 @@ enum GamelogChangeType { }; +static const uint GAMELOG_REVISION_LENGTH = 15; + /** Contains information about one logged change */ struct LoggedChange { GamelogChangeType ct; ///< Type of change logged in this struct @@ -42,7 +43,7 @@ struct LoggedChange { byte landscape; ///< landscape (temperate, arctic, ...) } mode; struct { - char text[NETWORK_REVISION_LENGTH]; ///< revision string, _openttd_revision + char text[GAMELOG_REVISION_LENGTH]; ///< revision string, _openttd_revision uint32 newgrf; ///< _openttd_newgrf_version uint16 slver; ///< _sl_version byte modified; ///< _openttd_revision_modified diff --git a/src/saveload/gamelog_sl.cpp b/src/saveload/gamelog_sl.cpp index f818eca13..d1c502d3b 100644 --- a/src/saveload/gamelog_sl.cpp +++ b/src/saveload/gamelog_sl.cpp @@ -29,7 +29,7 @@ static const SaveLoad _glog_mode_desc[] = { }; static const SaveLoad _glog_revision_desc[] = { - SLE_ARR(LoggedChange, revision.text, SLE_UINT8, NETWORK_REVISION_LENGTH), + SLE_ARR(LoggedChange, revision.text, SLE_UINT8, GAMELOG_REVISION_LENGTH), SLE_VAR(LoggedChange, revision.newgrf, SLE_UINT32), SLE_VAR(LoggedChange, revision.slver, SLE_UINT16), SLE_VAR(LoggedChange, revision.modified, SLE_UINT8), |