Crashlog: Log pathfinders and day length factor
This commit is contained in:
@@ -179,6 +179,13 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
|||||||
*/
|
*/
|
||||||
char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
||||||
{
|
{
|
||||||
|
auto pathfinder_name = [](uint8 pf) -> const char * {
|
||||||
|
switch (pf) {
|
||||||
|
case VPF_NPF: return "NPF";
|
||||||
|
case VPF_YAPF: return "YAPF";
|
||||||
|
default: return "-";
|
||||||
|
};
|
||||||
|
};
|
||||||
buffer += seprintf(buffer, last,
|
buffer += seprintf(buffer, last,
|
||||||
"Configuration:\n"
|
"Configuration:\n"
|
||||||
" Blitter: %s\n"
|
" Blitter: %s\n"
|
||||||
@@ -189,7 +196,8 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
|||||||
" Network: %s\n"
|
" Network: %s\n"
|
||||||
" Sound driver: %s\n"
|
" Sound driver: %s\n"
|
||||||
" Sound set: %s (%u)\n"
|
" Sound set: %s (%u)\n"
|
||||||
" Video driver: %s\n\n",
|
" Video driver: %s\n"
|
||||||
|
" Pathfinder: %s %s %s\n\n",
|
||||||
BlitterFactory::GetCurrentBlitter() == nullptr ? "none" : BlitterFactory::GetCurrentBlitter()->GetName(),
|
BlitterFactory::GetCurrentBlitter() == nullptr ? "none" : BlitterFactory::GetCurrentBlitter()->GetName(),
|
||||||
BaseGraphics::GetUsedSet() == nullptr ? "none" : BaseGraphics::GetUsedSet()->name,
|
BaseGraphics::GetUsedSet() == nullptr ? "none" : BaseGraphics::GetUsedSet()->name,
|
||||||
BaseGraphics::GetUsedSet() == nullptr ? UINT32_MAX : BaseGraphics::GetUsedSet()->version,
|
BaseGraphics::GetUsedSet() == nullptr ? UINT32_MAX : BaseGraphics::GetUsedSet()->version,
|
||||||
@@ -201,7 +209,8 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
|||||||
SoundDriver::GetInstance() == nullptr ? "none" : SoundDriver::GetInstance()->GetName(),
|
SoundDriver::GetInstance() == nullptr ? "none" : SoundDriver::GetInstance()->GetName(),
|
||||||
BaseSounds::GetUsedSet() == nullptr ? "none" : BaseSounds::GetUsedSet()->name,
|
BaseSounds::GetUsedSet() == nullptr ? "none" : BaseSounds::GetUsedSet()->name,
|
||||||
BaseSounds::GetUsedSet() == nullptr ? UINT32_MAX : BaseSounds::GetUsedSet()->version,
|
BaseSounds::GetUsedSet() == nullptr ? UINT32_MAX : BaseSounds::GetUsedSet()->version,
|
||||||
VideoDriver::GetInstance() == nullptr ? "none" : VideoDriver::GetInstance()->GetName()
|
VideoDriver::GetInstance() == nullptr ? "none" : VideoDriver::GetInstance()->GetName(),
|
||||||
|
pathfinder_name(_settings_game.pf.pathfinder_for_trains), pathfinder_name(_settings_game.pf.pathfinder_for_roadvehs), pathfinder_name(_settings_game.pf.pathfinder_for_ships)
|
||||||
);
|
);
|
||||||
|
|
||||||
buffer += seprintf(buffer, last,
|
buffer += seprintf(buffer, last,
|
||||||
@@ -396,7 +405,7 @@ char *CrashLog::FillCrashLog(char *buffer, const char *last) const
|
|||||||
|
|
||||||
YearMonthDay ymd;
|
YearMonthDay ymd;
|
||||||
ConvertDateToYMD(_date, &ymd);
|
ConvertDateToYMD(_date, &ymd);
|
||||||
buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i, %i)\n", _cur_date_ymd.year, _cur_date_ymd.month + 1, _cur_date_ymd.day, _date_fract, _tick_skip_counter);
|
buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i, %i) (DL: %u)\n", _cur_date_ymd.year, _cur_date_ymd.month + 1, _cur_date_ymd.day, _date_fract, _tick_skip_counter, _settings_game.economy.day_length_factor);
|
||||||
if (_game_load_time != 0) {
|
if (_game_load_time != 0) {
|
||||||
buffer += seprintf(buffer, last, "Game loaded at: %i-%02i-%02i (%i, %i), %s",
|
buffer += seprintf(buffer, last, "Game loaded at: %i-%02i-%02i (%i, %i), %s",
|
||||||
_game_load_cur_date_ymd.year, _game_load_cur_date_ymd.month + 1, _game_load_cur_date_ymd.day, _game_load_date_fract, _game_load_tick_skip_counter, asctime(gmtime(&_game_load_time)));
|
_game_load_cur_date_ymd.year, _game_load_cur_date_ymd.month + 1, _game_load_cur_date_ymd.day, _game_load_date_fract, _game_load_tick_skip_counter, asctime(gmtime(&_game_load_time)));
|
||||||
@@ -449,7 +458,7 @@ char *CrashLog::FillDesyncCrashLog(char *buffer, const char *last) const
|
|||||||
|
|
||||||
YearMonthDay ymd;
|
YearMonthDay ymd;
|
||||||
ConvertDateToYMD(_date, &ymd);
|
ConvertDateToYMD(_date, &ymd);
|
||||||
buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i, %i)\n", _cur_date_ymd.year, _cur_date_ymd.month + 1, _cur_date_ymd.day, _date_fract, _tick_skip_counter);
|
buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i, %i) (DL: %u)\n", _cur_date_ymd.year, _cur_date_ymd.month + 1, _cur_date_ymd.day, _date_fract, _tick_skip_counter, _settings_game.economy.day_length_factor);
|
||||||
if (_game_load_time != 0) {
|
if (_game_load_time != 0) {
|
||||||
buffer += seprintf(buffer, last, "Game loaded at: %i-%02i-%02i (%i, %i), %s",
|
buffer += seprintf(buffer, last, "Game loaded at: %i-%02i-%02i (%i, %i), %s",
|
||||||
_game_load_cur_date_ymd.year, _game_load_cur_date_ymd.month + 1, _game_load_cur_date_ymd.day, _game_load_date_fract, _game_load_tick_skip_counter, asctime(gmtime(&_game_load_time)));
|
_game_load_cur_date_ymd.year, _game_load_cur_date_ymd.month + 1, _game_load_cur_date_ymd.day, _game_load_date_fract, _game_load_tick_skip_counter, asctime(gmtime(&_game_load_time)));
|
||||||
|
Reference in New Issue
Block a user