diff --git a/Design-Doc%3A-%60level%60-tool.md b/Design-Doc%3A-%60level%60-tool.md index 0a95b90..0998d4a 100644 --- a/Design-Doc%3A-%60level%60-tool.md +++ b/Design-Doc%3A-%60level%60-tool.md @@ -90,7 +90,7 @@ This file contains the entity-component system defined by the [attributes](#enti This file format is optimised for use on-console and as such uses sparse arrays and unions to represent most data. An index into each of these sparse arrays constitutes the ID of a given kind of data. This allows your game engine to find types, component attributes, etc without having to iterate through arrays in hot loops. #### Type Table -Holds the registry of types and which set of components is associated with each type. An index into this table is the ID of the type. If there are no components in the type, that type ID is unused. +Holds the registry of types and which set of components is associated with each type. An index into this table is the ID of the type. If there are no components in the type, that type ID is unused. Maximum of 255 types per level. ``` 2 bytes: Number of Types (A Type is a predetermined combination of components.) 2 bytes: Type Definition Union Size @@ -107,7 +107,11 @@ Holds the list of active entities (or Objects). Normally you memcpy this into yo * The object table is a sparse array of active entities (or Objects) you memcpy into RAM. * Normally this is 512 but future versions of level may permit customisation. For (Object Table Size): - 2 bytes: ID of the Type. (00 = No object active in this slot) + 1 byte: ID of the Type. + * 00 = No object active in this slot + * To dereference Type: + * Multiply this ID by (Type Definition Union Size) + * Add that to address of Type Table - 4 bytes ``` #### Component Attribute Table