migrate from dynamic::Value to dv::value & total erase namespace 'dynamic'

This commit is contained in:
MihailRis
2024-09-18 23:31:18 +03:00
parent d3ba4b2e3e
commit 34d2e6d400
69 changed files with 1247 additions and 2248 deletions
+7 -8
View File
@@ -11,7 +11,6 @@
#include "coders/json.hpp"
#include "coders/obj.hpp"
#include "constants.hpp"
#include "data/dynamic.hpp"
#include "debug/Logger.hpp"
#include "files/engine_paths.hpp"
#include "files/files.hpp"
@@ -220,17 +219,17 @@ static void read_anim_file(
std::vector<std::pair<std::string, int>>& frameList
) {
auto root = files::read_json(animFile);
auto frameArr = root->list("frames");
float frameDuration = DEFAULT_FRAME_DURATION;
std::string frameName;
if (frameArr) {
for (size_t i = 0; i < frameArr->size(); i++) {
auto currentFrame = frameArr->list(i);
if (auto found = root.at("frames")) {
auto& frameArr = *found;
for (size_t i = 0; i < frameArr.size(); i++) {
auto currentFrame = frameArr[i];
frameName = currentFrame->str(0);
if (currentFrame->size() > 1) {
frameDuration = currentFrame->integer(1);
frameName = currentFrame[0].asString();
if (currentFrame.size() > 1) {
frameDuration = currentFrame[1].asNumber();
}
frameList.emplace_back(frameName, frameDuration);
}