1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-15 19:41:47 +00:00

git subrepo pull --force tools/ZAPD (#1049)

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "a3363333d"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "a3363333d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
This commit is contained in:
fig02 2021-12-03 15:57:05 -05:00 committed by GitHub
parent 5e9d24fca4
commit 68899c2e33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 1311 additions and 569 deletions

View file

@ -5,6 +5,7 @@
#include "Globals.h"
#include "Utils/BitConverter.h"
#include "Utils/StringHelper.h"
#include "WarningHandler.h"
REGISTER_ZFILENODE(Skeleton, ZSkeleton);
REGISTER_ZFILENODE(LimbTable, ZLimbTable);
@ -27,18 +28,19 @@ void ZSkeleton::ParseXML(tinyxml2::XMLElement* reader)
type = ZSkeletonType::Curve;
else if (skelTypeXml != "Normal")
{
throw std::runtime_error(StringHelper::Sprintf("ZSkeleton::ParseXML: Error in '%s'.\n"
"\t Invalid Type found: '%s'.\n",
name.c_str(), skelTypeXml.c_str()));
HANDLE_ERROR_RESOURCE(WarningType::InvalidAttributeValue, parent, this, rawDataIndex,
"invalid value found for 'Type' attribute", "");
}
std::string limbTypeXml = registeredAttributes.at("LimbType").value;
limbType = ZLimb::GetTypeByAttributeName(limbTypeXml);
if (limbType == ZLimbType::Invalid)
{
throw std::runtime_error(StringHelper::Sprintf("ZSkeleton::ParseXML: Error in '%s'.\n"
"\t Invalid LimbType found: '%s'.\n",
name.c_str(), limbTypeXml.c_str()));
HANDLE_ERROR_RESOURCE(
WarningType::InvalidAttributeValue, parent, this, rawDataIndex,
StringHelper::Sprintf("invalid value '%s' found for 'LimbType' attribute",
limbTypeXml.c_str()),
"Defaulting to 'Standard'.");
}
}
@ -170,11 +172,9 @@ void ZLimbTable::ParseXML(tinyxml2::XMLElement* reader)
limbType = ZLimb::GetTypeByAttributeName(limbTypeXml);
if (limbType == ZLimbType::Invalid)
{
fprintf(stderr,
"ZLimbTable::ParseXML: Warning in '%s'.\n"
"\t Invalid LimbType found: '%s'.\n"
"\t Defaulting to 'Standard'.\n",
name.c_str(), limbTypeXml.c_str());
HANDLE_WARNING_RESOURCE(WarningType::InvalidAttributeValue, parent, this, rawDataIndex,
"invalid value found for 'LimbType' attribute.",
"Defaulting to 'Standard'.");
limbType = ZLimbType::Standard;
}