diff options
author | Paul Gilbert | 2016-04-04 22:18:18 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-04-04 22:18:18 -0400 |
commit | 303f577c4f9b36cd78f5104a2971a27263fb051c (patch) | |
tree | adc14b3b519497fe1e5c9185fd821fc9bd0007da /engines/titanic/support/movie.cpp | |
parent | 572301a33efc8c574d7ab2fc9b243050b2db1492 (diff) | |
download | scummvm-rg350-303f577c4f9b36cd78f5104a2971a27263fb051c.tar.gz scummvm-rg350-303f577c4f9b36cd78f5104a2971a27263fb051c.tar.bz2 scummvm-rg350-303f577c4f9b36cd78f5104a2971a27263fb051c.zip |
TITANIC: Hacked copy of AVIDecoder to handle ycursors.avi
Mouse cursor is now somewhat correctly showing
Diffstat (limited to 'engines/titanic/support/movie.cpp')
-rw-r--r-- | engines/titanic/support/movie.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp index ed5cffaac1..25909183dd 100644 --- a/engines/titanic/support/movie.cpp +++ b/engines/titanic/support/movie.cpp @@ -20,6 +20,8 @@ * */ +#include "image/codecs/cinepak.h" +#include "titanic/support/avi_decoder.h" #include "titanic/support/movie.h" #include "titanic/titanic.h" @@ -44,7 +46,13 @@ bool CMovie::get10() { /*------------------------------------------------------------------------*/ OSMovie::OSMovie(const CResourceKey &name, CVideoSurface *surface) : _videoSurface(surface) { -// _aviDecoder.loadFile(name.getString()); + _video = new AVIDecoder(); + if (!_video->loadFile(name.getString())) + error("Could not open video - %s", name.getString().c_str()); +} + +OSMovie::~OSMovie() { + delete _video; } void OSMovie::proc8(int v1, CVideoSurface *surface) { @@ -76,13 +84,12 @@ void OSMovie::proc14() { } void OSMovie::setFrame(uint frameNumber) { - warning("TODO: OSMovie::setFrame"); - /* - _aviDecoder.seekToFrame(frameNumber); - const Graphics::Surface *s = _aviDecoder.decodeNextFrame(); + _video->seekToFrame(frameNumber); + const Graphics::Surface *s = _video->decodeNextFrame(); + Graphics::Surface *surf = s->convertTo(g_system->getScreenFormat()); - _videoSurface->blitFrom(Common::Point(0, 0), s); - */ + _videoSurface->blitFrom(Common::Point(0, 0), surf); + delete surf; } void OSMovie::proc16() { |