#include <kyraresource.h>
Inheritance diagram for KrResource:

Public Member Functions | |
| virtual U32 | Type ()=0 |
| The type of the resource. ( ex, KYRATAG_SPRITE ). | |
| virtual const std::string & | TypeName ()=0 |
| The name of the type. ( ex, "Sprite" ). | |
| const std::string & | ResourceName () |
| A unique name for this particular resource. ( "Warrior" ). | |
| const U32 | ResourceId () |
| A unique id for this resource. (BEM_WARRIOR). | |
| virtual KrSpriteResource * | ToSpriteResource () |
| Return a pointer if this is a sprite resource. | |
| virtual KrTileResource * | ToTileResource () |
| Return a pointer if this is a tile resource. | |
| virtual KrCanvasResource * | ToCanvasResource () |
| Return a pointer if this is a canvas resource. | |
| virtual KrFontResource * | ToFontResource () |
| Return a pointer if this is a font resource. | |
| virtual KrBoxResource * | ToBoxResource () |
| Return a pointer if this is a box resource. | |
| virtual KrTextDataResource * | ToTextDataResource () |
| Return a pointer if this is a text data resource. | |
| virtual KrBinaryDataResource * | ToBinaryDataResource () |
| Return a pointer if this is a binary data resource. | |
| virtual void | CacheScale (GlFixed xScale, GlFixed yScale) |
| Create a cached resourced. | |
| virtual bool | IsScaleCached (GlFixed xScale, GlFixed yScale) |
| Check the cache for a given scale. | |
| virtual void | FreeScaleCache () |
| Free up the cache. | |
KrResource is the parent class for all resources.
Create a cached resourced.
A resource can be drawn much more quickly if its scaled image is pre-calculated. This generates and scaled version of the resource and stores it for fast drawing. The cached version will always be used before a version generated on the fly.
Reimplemented in KrCanvasResource, KrSpriteResource, and KrTileResource.
1.4.7