engine/maps/source/MapExitUtils.cpp
// Attach a map exit to a tile, in a particular direction.
Attach a map exit to a tile, in a particular direction.
Attach a map exit to a tile in a particular direction .
MapExitPtr MapExitUtils::add_exit_to_tile(MapPtr map, const Coordinate& c, const Direction direction, const string& map_exit_id)
{
  TilePtr tile = map->at(c);
  MapExitPtr exit;
  if (tile)
  {
    TileExitMap& tile_exit_map = tile->get_tile_exit_map_ref();
    MapExitPtr map_exit = make_shared<MapExit>();
    map_exit->set_map_id(map_exit_id);
    add_map_tile_exit(map->get_tile_exits_ref(), direction, c);
    tile_exit_map[direction] = map_exit;    
    exit = map_exit;
  }
  return exit;
}
MapExitPtr MapExitUtils :: add_exit_to_tile ( MapPtr map , const Coordinate & c , const Direction direction , const string & map_exit_id ) { TilePtr tile = map -> at ( c ) ; MapExitPtr exit ; if ( tile ) { TileExitMap & tile_exit_map = tile -> get_tile_exit_map_ref ( ) ; MapExitPtr map_exit = make_shared < MapExit > ( ) ; map_exit -> set_map_id ( map_exit_id ) ; add_map_tile_exit ( map -> get_tile_exits_ref ( ) , direction , c ) ; tile_exit_map [ direction ] = map_exit ; exit = map_exit ; } return exit ; }
Attach a map exit to a tile, in a particular direction.
Attach a map exit to a tile in a particular direction .