TilePtr Map::getTile(const Position& pos) { TilePtr& tile = m_tiles[pos]; if(!tile) tile = TilePtr(new Tile(pos)); return tile; }
House::House(uint32 hId, const std::string &name, const Position &pos) { m_nullTile = TilePtr(new Tile(Position())); setId(hId); setName(name); if(pos.isValid()) setEntry(pos); }
TilePtr Map::getTile(const Position& pos) { if(!pos.isValid()) return nullptr; TilePtr& tile = m_tiles[pos]; if(!tile) tile = TilePtr(new Tile(pos)); return tile; }
House::House() { m_nullTile = TilePtr(new Tile(Position())); }