A Cache to avoid creating multiple instances of identical sprites. More...
The key is only the name, in which case two sprites with the same name but with different solid setting are considered the same.
Construct a SpriteCache that will load its bitmaps from the specified ResourceStream.
Load a sprite into the cache.
Notice: for each name there is only one sprite instance. If a sprite with the given name already exists in the cache, it is returned as is. use update() to modify settings.
if Solid != 0, collision info is generated for the sprite. if bitmapName == NULL, bitmapName is assumed to be the same as the sprite name. if r == Rect2D(0,0,-1,-1) (same as Rect2D()), the rect is the entire bitmap.
returns NULL if there is no resource named bitmapName (or name if bitmapName==NULL).
update a sprite in the cache .
returns NULL if an entry does not exist in the cache for name.
get from the cache a sprite pointer for the given name.
returns NULL if there is no sprite in the cache with the given name.