| 671 | } |
| 672 | |
| 673 | bool BattleUnitAnimationPack::loadAnimationPack(GameState &state, const UString &path) |
| 674 | { |
| 675 | auto file = fw().data->fs.open(path); |
| 676 | if (!file) |
| 677 | { |
| 678 | LogError("Failed to open animation pack \"%s\"", path); |
| 679 | } |
| 680 | const auto fullPath = file.systemPath(); |
| 681 | |
| 682 | auto archive = SerializationArchive::readArchive(fullPath); |
| 683 | if (!archive) |
| 684 | { |
| 685 | LogError("Failed to read \"%s\"", fullPath); |
| 686 | return false; |
| 687 | } |
| 688 | |
| 689 | return deserialize(*this, state, archive.get()); |
| 690 | } |
| 691 | |
| 692 | static bool serialize(const BattleMapSectorTiles &mapSector, SerializationArchive *archive) |
| 693 | { |
no test coverage detected