aboutsummaryrefslogtreecommitdiff
path: root/engines/composer/resource.h
diff options
context:
space:
mode:
authorupthorn2012-05-25 23:42:07 -0700
committerangstsmurf2016-10-18 02:08:53 +0200
commit2b58f42b8c35e002a19acd60755ef2c62d32a042 (patch)
tree8e77d921ebb168e014c11ab287b84a02c50e978d /engines/composer/resource.h
parent529a82a50a299e80bca5553b66c4796c88582471 (diff)
downloadscummvm-rg350-2b58f42b8c35e002a19acd60755ef2c62d32a042.tar.gz
scummvm-rg350-2b58f42b8c35e002a19acd60755ef2c62d32a042.tar.bz2
scummvm-rg350-2b58f42b8c35e002a19acd60755ef2c62d32a042.zip
COMPOSER: Continued work on saving/loading functionality.
Diffstat (limited to 'engines/composer/resource.h')
-rw-r--r--engines/composer/resource.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/composer/resource.h b/engines/composer/resource.h
index b624da1776..52748bacd2 100644
--- a/engines/composer/resource.h
+++ b/engines/composer/resource.h
@@ -106,7 +106,7 @@ struct PipeResource {
class Pipe {
public:
- Pipe(Common::SeekableReadStream *stream);
+ Pipe(Common::SeekableReadStream *stream, uint16 pipeId);
virtual ~Pipe();
virtual void nextFrame();
@@ -116,6 +116,11 @@ public:
Common::SeekableReadStream *getResource(uint32 tag, uint16 id, bool buffering);
virtual const Common::Array<uint16> *getScripts() { return NULL; }
+#ifdef SAVING_ANYWHERE
+ uint16 id() const { return _pipeId; }
+ uint32 offset() const { return _offset; }
+ void setOffset(uint32 offset) { while (_offset < offset) nextFrame(); }
+#endif
protected:
Common::SeekableReadStream *_stream;
@@ -123,13 +128,16 @@ protected:
typedef Common::HashMap<uint16, PipeResource> ResourceMap;
typedef Common::HashMap<uint32, ResourceMap> TypeMap;
TypeMap _types;
+#ifdef SAVING_ANYWHERE
+ uint16 _pipeId;
+#endif
uint32 _offset;
};
class OldPipe : public Pipe {
public:
- OldPipe(Common::SeekableReadStream *stream);
+ OldPipe(Common::SeekableReadStream *stream, uint16 pipeId);
void nextFrame();
const Common::Array<uint16> *getScripts() { return &_scripts; }