From 892d0b2cf67ac7b708e4a5aa1d3dbd6d62954264 Mon Sep 17 00:00:00 2001 From: Ashley N Date: Sat, 9 Sep 2023 14:44:58 +0000 Subject: [PATCH] Update Design Doc: `level` tool --- Design-Doc%3A-%60level%60-tool.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Design-Doc%3A-%60level%60-tool.md b/Design-Doc%3A-%60level%60-tool.md index 415d184..b1d5523 100644 --- a/Design-Doc%3A-%60level%60-tool.md +++ b/Design-Doc%3A-%60level%60-tool.md @@ -88,13 +88,14 @@ The collision map is just an array of 8-bit unsigned integers laid out with the This file contains the entity-component system defined by the [attributes](#entity-component-system) set in Tiled Map Editor's object layer(s). #### Type Table -Holds the registry of types and which set of components is associated with each type. +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. ``` 2 bytes: Number of Types (A Type is a predetermined combination of components.) 2 bytes: Type Definition Union Size * This is the size in bytes of the largest combo of components for a type. + * Remember each component ID is 1 byte. For (Number of Types * Type Definition Union Size): - 1 byte: ID of the component (00 = No component in this slot, supposed to be at end) + (Type Definition Union Size) bytes: ID of the component (00 = No component in this slot, supposed to be at end) ``` #### Object Table @@ -112,7 +113,8 @@ Holds the list of active component attributes for each entity. Is a tagged union ``` 2 bytes: Component Attribute Union Size * This is the size in bytes of the largest type - * i.e. the one requiring the most bytes for its component attributes (2 bytes each). + * i.e. the one requiring the most bytes for its component attributes + * Remember each Component Attribute is 2 bytes. For (Object Table Size * Component Attribute Union Size): (Component Attribute Union Size) bytes: ```