aboutsummaryrefslogtreecommitdiff
path: root/engines/composer/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/composer/resource.h')
-rw-r--r--engines/composer/resource.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/engines/composer/resource.h b/engines/composer/resource.h
index 4cadd80e22..4248ad949a 100644
--- a/engines/composer/resource.h
+++ b/engines/composer/resource.h
@@ -31,6 +31,8 @@
namespace Composer {
+class Animation;
+
#define ID_LBRC MKTAG('L','B','R','C') // Main FourCC
#define ID_ANIM MKTAG('A','N','I','M') // Animation
@@ -88,6 +90,35 @@ public:
bool openStream(Common::SeekableReadStream *stream);
};
+struct PipeResourceEntry {
+ uint32 size;
+ uint32 offset;
+};
+
+struct PipeResource {
+ Common::Array<PipeResourceEntry> entries;
+};
+
+class Pipe {
+public:
+ Pipe(Common::SeekableReadStream *stream);
+ void nextFrame();
+
+ Animation *_anim;
+
+ bool hasResource(uint32 tag, uint16 id) const;
+ Common::SeekableReadStream *getResource(uint32 tag, uint16 id, bool buffering);
+
+protected:
+ Common::SeekableReadStream *_stream;
+
+ typedef Common::HashMap<uint16, PipeResource> ResourceMap;
+ typedef Common::HashMap<uint32, ResourceMap> TypeMap;
+ TypeMap _types;
+
+ uint32 _offset;
+};
+
} // End of namespace Composer
#endif