|
OpenTTD Source 20260304-master-g1baaa74679
|
Helpers for outputting debug information. More...
#include "../stdafx.h"#include "../rail_map.h"#include "../core/enum_type.hpp"#include "dbg_helpers.h"#include "../safeguards.h"Go to the source code of this file.
Functions | |
| std::string | ValueStr (Trackdir td) |
| Return name of given Trackdir. | |
| std::string | ValueStr (TrackdirBits td_bits) |
| Return composed name of given TrackdirBits. | |
| std::string | ValueStr (DiagDirection dd) |
| Return name of given DiagDirection. | |
| std::string | ValueStr (SignalType t) |
| Return name of given SignalType. | |
| std::string | TileStr (TileIndex tile) |
| Translate TileIndex into string. | |
Variables | |
| static const std::string_view | trackdir_names [] |
| Trackdir & TrackdirBits short names. | |
| static const std::string_view | diagdir_names [] |
| DiagDirection short names. | |
| static const std::string_view | signal_type_names [] |
| SignalType short names. | |
Helpers for outputting debug information.
Definition in file dbg_helpers.cpp.
| std::string TileStr | ( | TileIndex | tile | ) |
Translate TileIndex into string.
| tile | The tile to convert. |
Definition at line 81 of file dbg_helpers.cpp.
References TileX(), and TileY().
Referenced by DumpTarget::WriteTile().
| std::string ValueStr | ( | DiagDirection | dd | ) |
Return name of given DiagDirection.
| dd | The diagonal direction. |
Definition at line 54 of file dbg_helpers.cpp.
References diagdir_names, INVALID_DIAGDIR, ItemAt(), and to_underlying().
| std::string ValueStr | ( | SignalType | t | ) |
Return name of given SignalType.
| t | The signal type. |
Definition at line 70 of file dbg_helpers.cpp.
References ItemAt(), signal_type_names, and to_underlying().
| std::string ValueStr | ( | Trackdir | td | ) |
Return name of given Trackdir.
| td | The track direction. |
Definition at line 28 of file dbg_helpers.cpp.
References INVALID_TRACKDIR, ItemAt(), to_underlying(), and trackdir_names.
Referenced by DumpTarget::WriteEnumT().
| std::string ValueStr | ( | TrackdirBits | td_bits | ) |
Return composed name of given TrackdirBits.
| td_bits | The track direction bits. |
Definition at line 38 of file dbg_helpers.cpp.
References ComposeName(), INVALID_TRACKDIR_BIT, to_underlying(), and trackdir_names.
|
static |
DiagDirection short names.
Definition at line 45 of file dbg_helpers.cpp.
Referenced by ValueStr().
|
static |
SignalType short names.
Definition at line 61 of file dbg_helpers.cpp.
Referenced by ValueStr().
|
static |
Trackdir & TrackdirBits short names.
Definition at line 18 of file dbg_helpers.cpp.
Referenced by ValueStr(), and ValueStr().