| 184 | } |
| 185 | |
| 186 | std::pair<db::DragonBonesData*, std::string> DragonBoneCache::load(String boneStr) { |
| 187 | if (_asyncLoadCount > 0) { |
| 188 | Error("can not get DragonBone data from \"{}\" during async loading.", boneStr.toString()); |
| 189 | return {nullptr, Slice::Empty}; |
| 190 | } |
| 191 | std::string boneFile, atlasFile, armatureName; |
| 192 | std::tie(boneFile, atlasFile, armatureName) = getFileFromStr(boneStr); |
| 193 | if (boneFile.empty() || atlasFile.empty()) return {nullptr, Slice::Empty}; |
| 194 | if (armatureName.empty()) { |
| 195 | return load(boneFile, atlasFile); |
| 196 | } |
| 197 | return {load(boneFile, atlasFile).first, armatureName}; |
| 198 | } |
| 199 | |
| 200 | std::pair<db::DragonBonesData*, std::string> DragonBoneCache::load(String boneFile, String atlasFile) { |
| 201 | if (_asyncLoadCount > 0) { |