2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +00:00

Massive fmtlib refactor

This commit is contained in:
Jack Andersen
2019-07-19 18:27:21 -10:00
parent e38a3ece89
commit 7a3da1f7a6
228 changed files with 2071 additions and 2116 deletions

View File

@@ -7,9 +7,9 @@ namespace DataSpec::DNAMP1 {
using ANIMOutStream = hecl::blender::ANIMOutStream;
void ANIM::IANIM::sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANIM::RigInverter<CINF>& rig) const {
os.format(
"act.hecl_fps = round(%f)\n"
"act.hecl_looping = %s\n",
os.format(fmt(
"act.hecl_fps = round({})\n"
"act.hecl_looping = {}\n"),
(1.0f / mainInterval), looping ? "True" : "False");
auto kit = chanKeys.begin();
@@ -26,7 +26,7 @@ void ANIM::IANIM::sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANI
continue;
}
os.format("bone_string = '%s'\n", bName->c_str());
os.format(fmt("bone_string = '{}'\n"), *bName);
os << "action_group = act.groups.new(bone_string)\n"
"\n"
"rotCurves = []\n"
@@ -111,7 +111,7 @@ UniqueID32 ANIM::GetEVNTId(athena::io::IStreamReader& reader) {
reader.seek(4);
return reader.readUint32Big();
default:
Log.report(logvisor::Error, "unrecognized ANIM version");
Log.report(logvisor::Error, fmt("unrecognized ANIM version"));
break;
}
return {};
@@ -134,7 +134,7 @@ void ANIM::Enumerate<BigDNA::Read>(typename Read::StreamT& reader) {
m_anim->read(reader);
break;
default:
Log.report(logvisor::Error, "unrecognized ANIM version");
Log.report(logvisor::Error, fmt("unrecognized ANIM version"));
break;
}
}
@@ -559,7 +559,7 @@ ANIM::ANIM(const BlenderAction& act, const std::unordered_map<std::string, atInt
for (const BlenderAction::Channel& chan : act.channels) {
auto search = idMap.find(chan.boneName);
if (search == idMap.cend()) {
Log.report(logvisor::Warning, "unable to find id for bone '%s'", chan.boneName.c_str());
Log.report(logvisor::Warning, fmt("unable to find id for bone '{}'"), chan.boneName);
continue;
}
if (addedBones.find(search->second) != addedBones.cend())