예제 #1
0
파일: map.cpp 프로젝트: gejza/Hoe3D
bool Map::Process(HoeUtils::XMLNode * cur)
{
	if (!cur->IsName("world"))
		throw "root node is not world.";

	HoeUtils::XMLNode * child = cur->GetChild();
	if (!child)
		throw "empty map.";

	do {
		if (child->IsName("mapinfo"))
		{
			this->ParseInfo(child);
			continue;
		}

		if (child->IsName("part"))
		{
			Part * p = new Part();
			p->Process(child);
			this->parts.push_back(p);
		}
	} while (child->Next());

	delete child;
	return true;
}