Added enum support to entity file format, see "Team" component for an example. Use ComponentInfo::Enum to convert enum string keys to its corresponding integer representation at runtime.

This commit is contained in:
2016-01-16 22:48:08 +01:00
parent f65ac65e30
commit 9ec32464bc
17 changed files with 383 additions and 222 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ ComponentWrapper World::AttachComponent(EntityID entity, const std::string& comp
// Allocate space for the component
ComponentWrapper c = pool->Allocate(entity);
// Write default values
memcpy(c.Data, ci.Defaults.get(), ci.Meta.Stride);
memcpy(c.Data, ci.Defaults.get(), ci.Stride);
return c;
}