diff options
author | Travis Howell | 2008-12-15 05:05:01 +0000 |
---|---|---|
committer | Travis Howell | 2008-12-15 05:05:01 +0000 |
commit | 1c9db8eebc9901aabbd07df714e236d3a09836f3 (patch) | |
tree | 14db510effd61949a286ef19bd772c863b56cfeb /graphics/smk_player.cpp | |
parent | 0eee8012616e3128dfbbe50d3f29330bc8ab00e3 (diff) | |
download | scummvm-rg350-1c9db8eebc9901aabbd07df714e236d3a09836f3.tar.gz scummvm-rg350-1c9db8eebc9901aabbd07df714e236d3a09836f3.tar.bz2 scummvm-rg350-1c9db8eebc9901aabbd07df714e236d3a09836f3.zip |
Adjust return values for HE games, when loading video file fails.
svn-id: r35374
Diffstat (limited to 'graphics/smk_player.cpp')
-rw-r--r-- | graphics/smk_player.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/graphics/smk_player.cpp b/graphics/smk_player.cpp index 78de65f994..ef206e12d7 100644 --- a/graphics/smk_player.cpp +++ b/graphics/smk_player.cpp @@ -319,6 +319,36 @@ SMKPlayer::~SMKPlayer() { closeFile(); } +int SMKPlayer::getWidth() { + if (!_fileStream) + return 0; + return _header.width; +} + +int SMKPlayer::getHeight() { + if (!_fileStream) + return 0; + return (_header.flags ? 2 : 1) * _header.height; +} + +int32 SMKPlayer::getCurFrame() { + if (!_fileStream) + return -1; + return _currentSMKFrame; +} + +int32 SMKPlayer::getFrameCount() { + if (!_fileStream) + return 0; + return _framesCount; +} + +int32 SMKPlayer::getFrameRate() { + if (!_fileStream) + return 0; + return _header.frameRate; +} + bool SMKPlayer::loadFile(const char *fileName) { closeFile(); |