Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/XML/Xeromyces.cpp
/* Copyright (C) 2015 Wildfire Games. | /* Copyright (C) 2019 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 362 Lines • ▼ Show 20 Lines | |||||
PSRETURN CXeromyces::CreateXMB(const xmlDocPtr doc, WriteBuffer& writeBuffer) | PSRETURN CXeromyces::CreateXMB(const xmlDocPtr doc, WriteBuffer& writeBuffer) | ||||
{ | { | ||||
// Header | // Header | ||||
writeBuffer.Append(UnfinishedHeaderMagicStr, 4); | writeBuffer.Append(UnfinishedHeaderMagicStr, 4); | ||||
// Version | // Version | ||||
writeBuffer.Append(&XMBVersion, 4); | writeBuffer.Append(&XMBVersion, 4); | ||||
std::set<std::string>::iterator it; | |||||
u32 i; | u32 i; | ||||
// Find the unique element/attribute names | // Find the unique element/attribute names | ||||
std::set<std::string> elementNames; | std::set<std::string> elementNames; | ||||
std::set<std::string> attributeNames; | std::set<std::string> attributeNames; | ||||
FindNames(xmlDocGetRootElement(doc), elementNames, attributeNames); | FindNames(xmlDocGetRootElement(doc), elementNames, attributeNames); | ||||
std::map<std::string, u32> elementIDs; | std::map<std::string, u32> elementIDs; | ||||
Show All 33 Lines |
Wildfire Games · Phabricator