diff options
author | Filippos Karapetis | 2016-09-21 00:50:53 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-10-03 00:33:41 +0300 |
commit | f017940ca08e32a206982376df0bdc334acdea55 (patch) | |
tree | ef91dae06046b3379be120ed6d22e81c7b415488 /engines/chewy/resource.cpp | |
parent | b60f5023ed8959798b6246e227717cc0ff1e8d44 (diff) | |
download | scummvm-rg350-f017940ca08e32a206982376df0bdc334acdea55.tar.gz scummvm-rg350-f017940ca08e32a206982376df0bdc334acdea55.tar.bz2 scummvm-rg350-f017940ca08e32a206982376df0bdc334acdea55.zip |
CHEWY: Initial work on game videos
Diffstat (limited to 'engines/chewy/resource.cpp')
-rw-r--r-- | engines/chewy/resource.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp index eae3896826..6a1b860d5b 100644 --- a/engines/chewy/resource.cpp +++ b/engines/chewy/resource.cpp @@ -226,4 +226,25 @@ Common::String TextResource::getText(uint num) { return str; } +VideoChunk *VideoResource::getVideoHeader(uint num) { + assert(num < _chunkList.size()); + + Chunk *chunk = &_chunkList[num]; + VideoChunk *vid = new VideoChunk(); + + _stream.seek(chunk->pos, SEEK_SET); + + if (_stream.readUint32BE() != MKTAG('C', 'F', 'O', '\0')) + error("Corrupt video resource"); + + vid->size = _stream.readUint32LE(); // always 0 + vid->frameCount = _stream.readUint16LE(); + vid->width = _stream.readUint16LE(); + vid->height = _stream.readUint16LE(); + vid->frameDelay = _stream.readUint32LE(); + vid->firstFrameOffset = _stream.readUint32LE(); // always 22 + + return vid; +} + } // End of namespace Chewy |