예제 #1
0
/**
 * Returns a region file with a specific position.
 */
bool World::getRegion(const RegionPos& pos, RegionFile& region) const {
	std::unordered_map<RegionPos, std::string, hash_function>::const_iterator it
		= region_files.find(pos);
	if (it == region_files.end())
		return false;
	region = RegionFile(it->second, rotation);
	return true;
}
예제 #2
0
bool World::getRegion(const RegionPos& pos, RegionFile& region) const {
	RegionMap::const_iterator it = region_files.find(pos);
	if (it == region_files.end())
		return false;
	region = RegionFile(it->second);
	region.setRotation(rotation);
	region.setWorldCrop(worldcrop);
	return true;
}
예제 #3
0
/**
 * Returns a region file with a specific position.
 */
bool World::getRegion(const RegionPos& pos, RegionFile& region) const {
	if(available_regions.count(pos) == 0)
		return false;
	region = RegionFile(region_files.at(pos), rotation);
	return true;
}