Mercurial > fife-parpg
diff engine/core/video/video.i @ 150:6e7d228def30
Lazy loading for animations.
Uses a Resource-Pointer class that behaves like
a pointer to an IResource, but only loads the
resource on demand.
There's a slight change of API, which is already
adapted to in the XML loaders. If you use
Animation.addFrame directly, either adapt to the
change or wait a few hours for a backwards compatibility
solution.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 11 Oct 2008 12:03:59 +0000 |
parents | 90005975cdbb |
children | 376b8afc9a18 |
line wrap: on
line diff
--- a/engine/core/video/video.i Sat Oct 11 06:23:45 2008 +0000 +++ b/engine/core/video/video.i Sat Oct 11 12:03:59 2008 +0000 @@ -89,7 +89,7 @@ public: explicit Animation(); ~Animation(); - void addFrame(Image* image, unsigned int duration); + void addFrame(ResourcePtr image, unsigned int duration); int getFrameIndex(unsigned int timestamp); Image* getFrame(int index); Image* getFrameByTimestamp(unsigned int timestamp);