diff options
author | Paweł Kołodziejski | 2003-03-17 19:10:12 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-03-17 19:10:12 +0000 |
commit | 56e9201a70366a39171de3162bd2c8ed2aec7ad6 (patch) | |
tree | 338c87419f3f9cb4bc93ff86d37da9a4ef7a063b /scumm/smush | |
parent | d29c68603f95af24e443c91efa872047fede8ed7 (diff) | |
download | scummvm-rg350-56e9201a70366a39171de3162bd2c8ed2aec7ad6.tar.gz scummvm-rg350-56e9201a70366a39171de3162bd2c8ed2aec7ad6.tar.bz2 scummvm-rg350-56e9201a70366a39171de3162bd2c8ed2aec7ad6.zip |
few corrections for smush
svn-id: r6827
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/smush_player.cpp | 26 | ||||
-rw-r--r-- | scumm/smush/smush_player.h | 2 |
2 files changed, 10 insertions, 18 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 84c219600d..c61759f8ee 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -654,9 +654,6 @@ void SmushPlayer::handleNewPalette(Chunk &b) { setPalette(_pal); } -void SmushPlayer::initCodecs() { -} - extern void smush_decode_codec1(byte *dst, byte *src, int height); void SmushPlayer::handleFrameObject(Chunk &b) { @@ -672,15 +669,7 @@ void SmushPlayer::handleFrameObject(Chunk &b) { int width = b.getWord(); int height = b.getWord(); - // hack for spontanic changing resolution - // differ than width scumm screen, and pass only one width 384x242 - if((height != _scumm->_realHeight) && (height != 242)) - return; - if (height == 242) - return; - if((width != _scumm->_realWidth) && (width != 384)) - return; - if (width == 384) + if((height != _scumm->_realHeight) || (width != _scumm->_realWidth)) return; if(_alreadyInit == false) { @@ -865,13 +854,10 @@ void SmushPlayer::setPalette(byte *palette) { } void SmushPlayer::updateScreen() { - int width = MIN(_width, _scumm->_realWidth); - int height = MIN(_height, _scumm->_realHeight); - if (_whileUpdate == false) { _whileCopyRect = true; uint32 end_time, start_time = _scumm->_system->get_msecs(); - _scumm->_system->copy_rect(_data, _width, 0, 0, width, height); + _scumm->_system->copy_rect(_data, _width, 0, 0, _width, _height); end_time = _scumm->_system->get_msecs(); debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time); _updateNeeded = true; @@ -880,9 +866,17 @@ void SmushPlayer::updateScreen() { } void SmushPlayer::play(const char *filename, const char *directory) { + File f; + f.open(filename, directory); + if(f.isOpen() == false) { + warning("SmushPlayer::setupAnim() File not found %s", filename); + return; + } + _whileUpdate = false; _whileCopyRect = false; _updateNeeded = false; + setupAnim(filename, directory); init(); diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h index 38651b0eae..52c79aad3a 100644 --- a/scumm/smush/smush_player.h +++ b/scumm/smush/smush_player.h @@ -79,7 +79,6 @@ public: void init(); void deinit(); void setupAnim(const char *file, const char *directory); - void initCodecs(); void updateScreen(); void play(const char *filename, const char *directory); void setPalette(byte *palette); @@ -87,7 +86,6 @@ public: protected: bool readString(const char *file, const char *directory); - void clean(); void checkBlock(const Chunk &, Chunk::type, uint32 = 0); void handleAnimHeader(Chunk &); void handleFrame(Chunk &); |