MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / loadAnimationPack

Method loadAnimationPack

game/state/gamestate_serialize.cpp:673–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673bool 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
692static bool serialize(const BattleMapSectorTiles &mapSector, SerializationArchive *archive)
693{

Callers 1

loadAnimationPacksMethod · 0.80

Calls 3

deserializeFunction · 0.85
openMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected