# dbg_helpers.cpp File Reference

Helpers for outputting debug information. More...

`#include "../stdafx.h"`
`#include "../rail_map.h"`
`#include "dbg_helpers.h"`

Go to the source code of this file.

## Functions

CStrA | ValueStr (Trackdir td)
| Return name of given Trackdir.
CStrA | ValueStr (TrackdirBits td_bits)
| Return composed name of given TrackdirBits.
CStrA | ValueStr (DiagDirection dd)
| Return name of given DiagDirection.
CStrA | ValueStr (SignalType t)
| Return name of given SignalType.
CStrA | TileStr (TileIndex tile)
| Translate TileIndex into string.

## Variables

static const char *const | trackdir_names []
| Trackdir & TrackdirBits short names.
static const char *const | diagdir_names []
| DiagDirection short names.
static const char *const | signal_type_names []
| SignalType short names.

## Detailed Description

Helpers for outputting debug information.

Definition in file dbg_helpers.cpp.

## Function Documentation

CStrA TileStr | ( | TileIndex | tile | ) |

Translate TileIndex into string.

Definition at line 68 of file dbg_helpers.cpp.

References TileX(), and TileY().

Referenced by DumpTarget::WriteTile().

CStrA ValueStr | ( | SignalType | t | ) |

Return name of given SignalType.

Definition at line 59 of file dbg_helpers.cpp.

References ItemAtT(), and signal_type_names.

CStrA ValueStr | ( | DiagDirection | dd | ) |

Return name of given DiagDirection.

Definition at line 45 of file dbg_helpers.cpp.

References diagdir_names, INVALID_DIAGDIR, and ItemAtT().

CStrA ValueStr | ( | TrackdirBits | td_bits | ) |

Return composed name of given TrackdirBits.

Definition at line 31 of file dbg_helpers.cpp.

References ComposeNameT(), INVALID_TRACKDIR_BIT, and trackdir_names.

CStrA ValueStr | ( | Trackdir | td | ) |

Return name of given Trackdir.

Definition at line 23 of file dbg_helpers.cpp.

References INVALID_TRACKDIR, ItemAtT(), and trackdir_names.

Referenced by DumpTarget::WriteEnumT().

## Variable Documentation

const char* const diagdir_names[]`[static]`

Initial value:

     {
      "NE", "SE", "SW", "NW",
    }

DiagDirection short names.

Definition at line 40 of file dbg_helpers.cpp.

Referenced by ValueStr().

const char* const signal_type_names[]`[static]`

Initial value:

     {
      "NORMAL", "ENTRY", "EXIT", "COMBO", "PBS", "NOENTRY",
    }

SignalType short names.

Definition at line 54 of file dbg_helpers.cpp.

Referenced by ValueStr().

const char* const trackdir_names[]`[static]`

Initial value:

     {
      "NE", "SE", "UE", "LE", "LS", "RS", "rne", "rse",
      "SW", "NW", "UW", "LW", "LN", "RN", "rsw", "rnw",
    }

Trackdir & TrackdirBits short names.

Definition at line 17 of file dbg_helpers.cpp.

Referenced by ValueStr().