engine/translators/source/MapTranslator.cpp
// Create a display tile from a given item
Create a display tile from a given item
Create a display tile from a given item
DisplayTile MapTranslator::create_display_tile_from_item(const ItemPtr& item, const Colour override_colour)
{
  bool apply_override = (override_colour != Colour::COLOUR_UNDEFINED && !item->get_glowing());
  Colour colour = item->get_colour();
  if (apply_override)
  {
    colour = override_colour;
  }
  uchar symbol = '?';
  if (item != nullptr)
  {
    symbol = item->get_symbol();
  }
  return create_display_tile_from_symbol_and_colour(symbol, colour);
}
DisplayTile MapTranslator :: create_display_tile_from_item ( const ItemPtr & item , const Colour override_colour ) { bool apply_override = ( override_colour != Colour :: COLOUR_UNDEFINED && ! item -> get_glowing ( ) ) ; Colour colour = item -> get_colour ( ) ; if ( apply_override ) { colour = override_colour ; } uchar symbol = ' ' ; if ( item != nullptr ) { symbol = item -> get_symbol ( ) ; } return create_display_tile_from_symbol_and_colour ( symbol , colour ) ; }
Create a display tile from a given item
Create a display tile from a given item