OpenTTD Source 20241224-master-gf74b0cf984
|
Definition of functions used for logging of fundamental changes to the game. More...
#include "stdafx.h"
#include "saveload/saveload.h"
#include "string_func.h"
#include "settings_type.h"
#include "gamelog_internal.h"
#include "console_func.h"
#include "debug.h"
#include "timer/timer_game_calendar.h"
#include "timer/timer_game_tick.h"
#include "rev.h"
#include "safeguards.h"
Go to the source code of this file.
Functions | |
static std::string | GetGamelogRevisionString () |
Return the revision string for the current client version, for use in gamelog. | |
static void | AddGrfInfo (std::back_insert_iterator< std::string > &output_iterator, uint32_t grfid, const MD5Hash *md5sum, const GRFConfig *gc) |
Adds the GRF ID, checksum and filename if found to the output iterator. | |
static bool | IsLoggableGrfConfig (const GRFConfig *g) |
Decides if GRF should be logged. | |
static std::vector< const GRFConfig * > | GenerateGRFList (const GRFConfig *grfc) |
Generates GRFList. | |
Variables | |
const SaveLoadVersion | SAVEGAME_VERSION |
current savegame version | |
SavegameType | _savegame_type |
type of savegame we are loading | |
uint32_t | _ttdp_version |
version of TTDP savegame (if applicable) | |
SaveLoadVersion | _sl_version |
the major savegame version identifier | |
uint8_t | _sl_minor_version |
the minor savegame version, DO NOT USE! | |
Gamelog | _gamelog |
Gamelog instance. | |
static const char *const | la_text [] |
Text messages for various logged actions. | |
Definition of functions used for logging of fundamental changes to the game.
Definition in file gamelog.cpp.
|
static |
Adds the GRF ID, checksum and filename if found to the output iterator.
output_iterator | The iterator to add the GRF info to. |
last | The end of the buffer |
grfid | GRF ID |
md5sum | array of md5sum to print, if known |
gc | GrfConfig, if known |
Definition at line 109 of file gamelog.cpp.
References BSWAP32(), FGCM_ANY, GRFConfig::filename, FindGRFConfig(), and FormatArrayAsHex().
Generates GRFList.
grfc | head of GRF linked list |
Definition at line 591 of file gamelog.cpp.
References IsLoggableGrfConfig(), and GRFConfig::next.
Referenced by Gamelog::GRFUpdate().
|
static |
Return the revision string for the current client version, for use in gamelog.
Definition at line 47 of file gamelog.cpp.
Referenced by Gamelog::Revision(), and Gamelog::TestRevision().
|
inlinestatic |
Decides if GRF should be logged.
g | grf to determine |
Definition at line 508 of file gamelog.cpp.
References GRFConfig::flags, GCF_STATIC, GCS_NOT_FOUND, HasBit(), and GRFConfig::status.
Referenced by GenerateGRFList(), and Gamelog::GRFAdd().
Gamelog _gamelog |
Gamelog instance.
Definition at line 31 of file gamelog.cpp.
Referenced by AfterLoadGame(), IntSettingDesc::ChangeValue(), DoLoad(), HandleCrash(), HandleCrash(), HandleSavegameLoadCrash(), GLOGChunkHandler::Load(), NewGRFConfirmationCallback(), GLOGChunkHandler::Save(), SaveOrLoad(), ShutdownGame(), SlError(), SurveyGamelog(), VehicleLengthChanged(), and CrashLog::WriteSavegame().
|
extern |
type of savegame we are loading
Definition at line 59 of file saveload.cpp.
Referenced by Order::ConvertFromOldSavegame(), CopyFromOldName(), LoadChunk(), and Gamelog::Oldver().
|
extern |
the minor savegame version, DO NOT USE!
Definition at line 64 of file saveload.cpp.
Referenced by DetermineSaveLoadFormat(), IsSavegameVersionBefore(), Gamelog::Oldver(), and SaveOrLoad().
|
extern |
the major savegame version identifier
Definition at line 63 of file saveload.cpp.
Referenced by DetermineSaveLoadFormat(), DoSave(), IsSavegameVersionBefore(), IsSavegameVersionBeforeOrAt(), Gamelog::Oldver(), LZOLoadFilter::Read(), SaveOrLoad(), SlCopyInternal(), SlIsObjectValidInSavegame(), and SlNullPointers().
|
extern |
version of TTDP savegame (if applicable)
Definition at line 62 of file saveload.cpp.
Referenced by Gamelog::Oldver().
|
static |
Text messages for various logged actions.
Definition at line 131 of file gamelog.cpp.
Referenced by Gamelog::Print().