16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 20:29:17 +02:00
Files
maszyna/entitysystem/ECSPersistence.h

13 lines
404 B
C++

#pragma once
#include <string>
class ECWorld;
namespace ecs_persistence
{
// Save all named entities to a JSON file. Returns number of entities saved, or -1 on error.
int save(ECWorld &world, const std::string &path);
// Load entities from a JSON file. Skips entities whose name already exists. Returns count loaded, or -1 on error.
int load(ECWorld &world, const std::string &path);
}