aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/video/robot_decoder.h
diff options
context:
space:
mode:
authorFilippos Karapetis2011-02-08 19:50:45 +0000
committerFilippos Karapetis2011-02-08 19:50:45 +0000
commit72a9706950675cc3fd04e39d0f842193d66a5f9e (patch)
tree39ad5b83dfc81c0836f1dc3473f73f4cd19990db /engines/sci/video/robot_decoder.h
parent656afd6daa2b468fdf2731f082d1fd5897e43110 (diff)
downloadscummvm-rg350-72a9706950675cc3fd04e39d0f842193d66a5f9e.tar.gz
scummvm-rg350-72a9706950675cc3fd04e39d0f842193d66a5f9e.tar.bz2
scummvm-rg350-72a9706950675cc3fd04e39d0f842193d66a5f9e.zip
SCI: Some work on robot videos
- The size of the videos is now calculated when they are loaded (this helps remove some nasty hacks and constant memory reallocations and simplifies the code) - Some work on frame placement (e.g. in robot 1305, Phantasmagoria) svn-id: r55830
Diffstat (limited to 'engines/sci/video/robot_decoder.h')
-rw-r--r--engines/sci/video/robot_decoder.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h
index eb0a150c9d..b8ca0ee857 100644
--- a/engines/sci/video/robot_decoder.h
+++ b/engines/sci/video/robot_decoder.h
@@ -62,9 +62,8 @@ public:
void close();
bool isVideoLoaded() const { return _fileStream != 0; }
- uint16 getWidth() const { assert(_surface); return _surface->w; }
- uint16 getHeight() const { assert(_surface); return _surface->h; }
- uint16 getPitch() const { assert(_surface); return _surface->pitch; }
+ uint16 getWidth() const { return _width; }
+ uint16 getHeight() const { return _height; }
uint32 getFrameCount() const { return _header.frameCount; }
const Graphics::Surface *decodeNextFrame();
Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
@@ -80,6 +79,7 @@ private:
void readHeaderChunk();
void readPaletteChunk(uint16 chunkSize);
void readFrameSizesChunk();
+ void calculateVideoDimensions();
void freeData();
@@ -89,6 +89,8 @@ private:
Common::SeekableSubReadStreamEndian *_fileStream;
+ uint16 _width;
+ uint16 _height;
uint32 *_frameTotalSize;
byte _palette[256 * 3];
bool _dirtyPalette;