Add & link CEntity.cpp

This commit is contained in:
2022-08-10 22:33:46 -04:00
parent 11f69fcb5d
commit 0b6ce7f781
6 changed files with 90 additions and 4 deletions

View File

@@ -21,17 +21,33 @@ struct TAreaId {
bool operator==(const TAreaId& other) const { return value == other.value; }
bool operator!=(const TAreaId& other) const { return value != other.value; }
};
struct TEditorId {
u32 value;
TEditorId() : value(-1) {}
TEditorId(u32 value) : value(value) {}
u32 Value() const { return value; }
bool operator==(const TEditorId& other) const { return value == other.value; }
bool operator!=(const TEditorId& other) const { return value != other.value; }
};
struct TUniqueId {
u16 value;
union {
struct {
u16 version : 6;
u16 id : 10;
};
u16 value;
};
TUniqueId() : value(-1) {}
TUniqueId(u16 value) : value(value) {}
u16 Value() const { return value; }
bool operator==(const TUniqueId& other) const { return value == other.value; }
bool operator!=(const TUniqueId& other) const { return value != other.value; }
};
#endif