diff --git a/MLEM.Data/DataTextureAtlas.cs b/MLEM.Data/DataTextureAtlas.cs index cb5d852..0dab8d0 100644 --- a/MLEM.Data/DataTextureAtlas.cs +++ b/MLEM.Data/DataTextureAtlas.cs @@ -9,11 +9,30 @@ using MLEM.Textures; namespace MLEM.Data { /// + /// /// This class represents an atlas of objects which are loaded from a special texture atlas file. /// To load a data texture atlas, you can use . - /// To see the structure of a Data Texture Atlas, you can check out the sandbox project: . - /// Additionally, if you are using Aseprite, there is a script to automatically populate it: + /// + /// + /// Data texture atlases are designed to be easy to write by hand. Because of this, their structure is very simple. + /// Each texture region defined in the atlas consists of its name, followed by a set of possible keywords and their arguments, separated by spaces. + /// The loc keyword defines the of the texture region as a rectangle whose origin is its top-left corner. It requires four arguments: x, y, width and height of the rectangle. + /// The (optional) piv keyword defines the of the texture region. It requires two arguments: x and y. If it is not supplied, the pivot defaults to the top-left corner of the texture region. + /// The (optional) off keyword defines an offset that is added onto the location and pivot of this texture region. This is useful when copying and pasting a previously defined texture region to create a second region that has a constant offset. It requires two arguments: The x and y offset. + /// + /// + /// The following entry defines a texture region with the name LongTableRight, whose will be a rectangle with X=32, Y=30, Width=64, Height=48, and whose will be a vector with X=80, Y=46. + /// + /// LongTableRight + /// loc 32 30 64 48 + /// piv 80 46 + /// + /// /// + /// + /// To see a Data Texture Atlas in action, you can check out the sandbox project: . + /// Additionally, if you are using Aseprite, there is a script to automatically populate it: . + /// public class DataTextureAtlas { ///