Almost working save sytem but the data I store is totally wrong. I need to also save the entity IDs being used and map them to the components.

This commit is contained in:
Zed A. Shaw 2024-11-05 02:38:36 -05:00
parent babc190525
commit d113dba42f
15 changed files with 213 additions and 64 deletions

View file

@ -3,27 +3,33 @@
#include "map.hpp"
#include "combat.hpp"
#include <deque>
#include "tser.hpp"
namespace Components {
namespace components {
struct Player {
DinkyECS::Entity entity;
DEFINE_SERIALIZABLE(Player, entity);
};
struct Position {
Point location;
DEFINE_SERIALIZABLE(Position, location);
};
struct Motion {
int dx;
int dy;
DEFINE_SERIALIZABLE(Motion, dx, dy);
};
struct Treasure {
int amount;
DEFINE_SERIALIZABLE(Treasure, amount);
};
struct Tile {
std::string chr = "!";
DEFINE_SERIALIZABLE(Tile, chr);
};
struct MapConfig {