The represents a way to store and retrieve sprite pixel data. Internally, the pixel data is stored in a class allowing you to dynamically resize sprites at run time.
This caches a sprite for easier look up and duplicate detection. Each sprite is cached as a string.
Clears the to a default color index of -1 and also resets the cache. This removes all sprites from the chip.
This configures the when it is activated. It registers itself with the engine as the default SpriteChip, it calls Clear() to clear any data and also sets the defaut size to 8 x 8.
This serializes the chip's data as JSON. It saves out the size of the internal TextureData, the sprite's dimensions, and if set to compressed mode, will save all the pixel data in the as well.
This will go through and attempt to deserialize any passed into it. It requires a dictionary with a string as the key and a generic object for the value.
Finds a sprite by looking it up against the cache. Returns -1 if no sprite is found. This is used for insuring duplicate sprites aren't added to the TextureData.
Tests to see if sprite is empty. This method iterates over all the ints in the supplied array and looks for a value of -1. If all values are -1 then it returns true.
Returns the next empty id in the index. Used for building tools to modify the like importers or if you want to add sprite dynamically at runtime and need to know the next open index.
Returns an array of ints that represent a sprite. Each int should be mapped to a color to display in the renderer.
This resizes the Ram's internal TextureData. This will destroy all sprites in memory.
This changes the color index by the offset. This will affect all of the sprites in memory. It is used when trying to quickly all of the sprites in the chip to a new range of colors.
Updates the sprite data at a given position in the data.