diff options
author | upthorn | 2012-05-28 13:00:07 -0700 |
---|---|---|
committer | angstsmurf | 2016-10-18 02:09:35 +0200 |
commit | 3d6eb8b49d759d2bc6c1507fdc91b7f9e42303cf (patch) | |
tree | 82425be8944d6f03cde06303aa9e78951e8fd1c6 /engines/composer | |
parent | bbcf4a921842bdf6edd3d11741e7b32b82d47b70 (diff) | |
download | scummvm-rg350-3d6eb8b49d759d2bc6c1507fdc91b7f9e42303cf.tar.gz scummvm-rg350-3d6eb8b49d759d2bc6c1507fdc91b7f9e42303cf.tar.bz2 scummvm-rg350-3d6eb8b49d759d2bc6c1507fdc91b7f9e42303cf.zip |
COMPOSER: cleaned up miscellaneous gcc warnings and formatting issues.
Diffstat (limited to 'engines/composer')
-rw-r--r-- | engines/composer/resource.cpp | 6 | ||||
-rw-r--r-- | engines/composer/resource.h | 8 | ||||
-rw-r--r-- | engines/composer/saveload.cpp | 14 |
3 files changed, 17 insertions, 11 deletions
diff --git a/engines/composer/resource.cpp b/engines/composer/resource.cpp index b433cd6c2a..063ee9cb14 100644 --- a/engines/composer/resource.cpp +++ b/engines/composer/resource.cpp @@ -263,7 +263,9 @@ Pipe::~Pipe() { void Pipe::nextFrame() { if (_offset == (uint)_stream->size()) return; +#ifdef SAVING_ANYWHERE _bufferedResources.push_back(_currBufferedResources); +#endif _currBufferedResources.clear(); _stream->seek(_offset, SEEK_SET); @@ -319,7 +321,9 @@ Common::SeekableReadStream *Pipe::getResource(uint32 tag, uint16 id, bool buffer res.entries[0].offset, res.entries[0].offset + res.entries[0].size); if (buffering) { _types[tag].erase(id); +#ifdef SAVING_ANYWHERE _currBufferedResources[tag].push_back(id); +#endif } return stream; } @@ -339,7 +343,9 @@ Common::SeekableReadStream *Pipe::getResource(uint32 tag, uint16 id, bool buffer } if (buffering) { _types[tag].erase(id); +#ifdef SAVING_ANYWHERE _currBufferedResources[tag].push_back(id); +#endif } return new Common::MemoryReadStream(buffer, size, DisposeAfterUse::YES); } diff --git a/engines/composer/resource.h b/engines/composer/resource.h index 55d7c20cc4..6383a2fd78 100644 --- a/engines/composer/resource.h +++ b/engines/composer/resource.h @@ -117,10 +117,10 @@ public: virtual const Common::Array<uint16> *getScripts() { return NULL; } #ifdef SAVING_ANYWHERE - uint16 pipeId() const { return _pipeId; } - uint32 offset() const { return _offset; } - void setOffset(uint32 off) { while (_offset < off) nextFrame(); } - typedef Common::HashMap<uint32, Common::List<uint16>> DelMap; + uint16 getPipeId() const { return _pipeId; } + uint32 getOffset() const { return _offset; } + void setOffset(uint32 offset) { while (_offset < offset) nextFrame(); } + typedef Common::HashMap<uint32, Common::List<uint16> > DelMap; Common::Array<DelMap> _bufferedResources; #endif diff --git a/engines/composer/saveload.cpp b/engines/composer/saveload.cpp index ca23b6155c..c959f38419 100644 --- a/engines/composer/saveload.cpp +++ b/engines/composer/saveload.cpp @@ -199,8 +199,8 @@ Common::Error ComposerEngine::loadGameState(int slot) { } // If we didn't find it, try the libraries. if (!stream) { - Common::List<Library>::iterator i; - for (i = _libraries.begin(); i != _libraries.end(); i++) { + Common::List<Library>::iterator j; + for (j = _libraries.begin(); j != _libraries.end(); j++) { if (!hasResource(ID_ANIM, animId)) continue; stream = getResource(ID_ANIM, animId); if (stream->size() >= size) break; @@ -211,7 +211,7 @@ Common::Error ComposerEngine::loadGameState(int slot) { continue; } - uint32 type = i->_archive->getResourceFlags(ID_ANIM, animId); + uint32 type = j->_archive->getResourceFlags(ID_ANIM, animId); // If the resource is a pipe itself, then load the pipe // and then fish the requested animation out of it. @@ -308,9 +308,9 @@ Common::Error ComposerEngine::saveGameState(int slot, const Common::String &desc tmp = _pendingPageChanges.size(); ser.syncAsUint32LE(tmp); for (Common::Array<PendingPageChange>::const_iterator i = _pendingPageChanges.begin(); i != _pendingPageChanges.end(); i++) { - uint16 tmp = (*i)._pageId; + uint16 tmp16 = (*i)._pageId; bool tmpb = (*i)._remove; - ser.syncAsUint16LE(tmp); + ser.syncAsUint16LE(tmp16); ser.syncAsByte(tmpb); } tmp = _stack.size(); @@ -357,8 +357,8 @@ Common::Error ComposerEngine::saveGameState(int slot, const Common::String &desc tmp = _pipes.size(); ser.syncAsUint32LE(tmp); for (Common::List<Pipe *>::const_iterator i = _pipes.reverse_begin(); i != _pipes.end(); i--) { - uint16 tmp16 = (*i)->pipeId(); - tmp = (*i)->offset(); + uint16 tmp16 = (*i)->getPipeId(); + tmp = (*i)->getOffset(); ser.syncAsUint16LE(tmp16); ser.syncAsUint32LE(tmp); tmp = (*i)->_bufferedResources.size(); |