Huge rework of editor and other changes.

This commit is contained in:
antopilo
2022-01-09 16:44:20 -05:00
parent 55ae840678
commit a71bfcbe75
55 changed files with 734 additions and 398 deletions

View File

@@ -6,9 +6,13 @@ using json = nlohmann::json;
#define BEGIN_SERIALIZE() json j;
#define SERIALIZE_VAL_LBL(lbl, v) j[lbl] = v;
#define SERIALIZE_VAL(v) j[#v] = this->v;
#define SERIALIZE_VEC3(v) \
#define SERIALIZE_VEC2(v) \
j[#v]["x"] = this->v.x; \
j[#v]["y"] = this->v.y; \
j[#v]["y"] = this->v.y;
#define SERIALIZE_VEC3(v) \
SERIALIZE_VEC2(v) \
j[#v]["z"] = this->v.z;
#define SERIALIZE_VEC4(v) \
@@ -26,7 +30,6 @@ using json = nlohmann::json;
if(j.contains(#c)) \
AddComponent<c>().Deserialize(j[#c].dump());
class ISerializable
{
public: