Reimplementing save/load file
This commit is contained in:
parent
260288a1b0
commit
9913eb6c8e
37 changed files with 437 additions and 350 deletions
|
|
@ -43,3 +43,15 @@ void CanvasComponentAllocator::register_class(World& world) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
void CanvasComponentAllocator::save_file(cereal::PortableBinaryOutputArchive& a) const {
|
||||
a(comp->get_type());
|
||||
comp->save_file(a);
|
||||
}
|
||||
|
||||
void CanvasComponentAllocator::load_file(cereal::PortableBinaryInputArchive& a, VersionNumber version) {
|
||||
CanvasComponentType t;
|
||||
a(t);
|
||||
comp = std::unique_ptr<CanvasComponent>(CanvasComponent::allocate_comp(t));
|
||||
comp->load_file(a, version);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue