mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Separate gamelog revision length from network revision length
parent
67c6f945fb
commit
faee0737e0
|
@ -12,7 +12,6 @@
|
||||||
#ifndef GAMELOG_INTERNAL_H
|
#ifndef GAMELOG_INTERNAL_H
|
||||||
#define GAMELOG_INTERNAL_H
|
#define GAMELOG_INTERNAL_H
|
||||||
|
|
||||||
#include "network/core/config.h"
|
|
||||||
#include "gamelog.h"
|
#include "gamelog.h"
|
||||||
|
|
||||||
/** Type of logged change */
|
/** Type of logged change */
|
||||||
|
@ -33,6 +32,8 @@ enum GamelogChangeType {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const uint GAMELOG_REVISION_LENGTH = 15;
|
||||||
|
|
||||||
/** Contains information about one logged change */
|
/** Contains information about one logged change */
|
||||||
struct LoggedChange {
|
struct LoggedChange {
|
||||||
GamelogChangeType ct; ///< Type of change logged in this struct
|
GamelogChangeType ct; ///< Type of change logged in this struct
|
||||||
|
@ -42,7 +43,7 @@ struct LoggedChange {
|
||||||
byte landscape; ///< landscape (temperate, arctic, ...)
|
byte landscape; ///< landscape (temperate, arctic, ...)
|
||||||
} mode;
|
} mode;
|
||||||
struct {
|
struct {
|
||||||
char text[NETWORK_REVISION_LENGTH]; ///< revision string, _openttd_revision
|
char text[GAMELOG_REVISION_LENGTH]; ///< revision string, _openttd_revision
|
||||||
uint32 newgrf; ///< _openttd_newgrf_version
|
uint32 newgrf; ///< _openttd_newgrf_version
|
||||||
uint16 slver; ///< _sl_version
|
uint16 slver; ///< _sl_version
|
||||||
byte modified; ///< _openttd_revision_modified
|
byte modified; ///< _openttd_revision_modified
|
||||||
|
|
|
@ -29,7 +29,7 @@ static const SaveLoad _glog_mode_desc[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const SaveLoad _glog_revision_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.newgrf, SLE_UINT32),
|
||||||
SLE_VAR(LoggedChange, revision.slver, SLE_UINT16),
|
SLE_VAR(LoggedChange, revision.slver, SLE_UINT16),
|
||||||
SLE_VAR(LoggedChange, revision.modified, SLE_UINT8),
|
SLE_VAR(LoggedChange, revision.modified, SLE_UINT8),
|
||||||
|
|
Loading…
Reference in New Issue