From 3b80a9378223b807a1ec3865bdeb94ba55d508e3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 1 Sep 2010 08:42:51 +0000 Subject: SWORD25: Put back changes accidentally removed in previous merge. svn-id: r53301 --- engines/sword25/fmv/movieplayer.cpp | 14 +++++--------- engines/sword25/fmv/theora_decoder.cpp | 1 + 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp index 0475c9003e..1941809c1a 100644 --- a/engines/sword25/fmv/movieplayer.cpp +++ b/engines/sword25/fmv/movieplayer.cpp @@ -61,13 +61,10 @@ MoviePlayer::~MoviePlayer() { _decoder.close(); } -bool MoviePlayer::LoadMovie(const Common::String &Filename, unsigned int Z) { +bool MoviePlayer::LoadMovie(const Common::String &filename, unsigned int z) { // Get the file and load it into the decoder - uint dataSize; - const byte *data = reinterpret_cast(Kernel::GetInstance()->GetPackage()->GetFile(Filename, &dataSize)); - Common::MemoryReadStream *stream = new Common::MemoryReadStream( - data, dataSize, DisposeAfterUse::YES); - _decoder.load(stream); + Common::SeekableReadStream *in = Kernel::GetInstance()->GetPackage()->GetStream(filename); + _decoder.load(in); // Ausgabebitmap erstellen GraphicEngine *pGfx = Kernel::GetInstance()->GetGfx(); @@ -86,7 +83,7 @@ bool MoviePlayer::LoadMovie(const Common::String &Filename, unsigned int Z) { _outputBitmap->SetScaleFactor(ScaleFactor); // Z-Wert setzen - _outputBitmap->SetZ(Z); + _outputBitmap->SetZ(z); // Ausgabebitmap auf dem Bildschirm zentrieren _outputBitmap->SetX((pGfx->GetDisplayWidth() - _outputBitmap->GetWidth()) / 2); @@ -150,8 +147,7 @@ void MoviePlayer::SetScaleFactor(float ScaleFactor) { } double MoviePlayer::GetTime() { - // FIXME: This may need conversion - return _decoder.getElapsedTime(); + return _decoder.getElapsedTime() / 1000.0; } } // End of namespace Sword25 diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp index cbd60d9fdd..7aee428fbb 100644 --- a/engines/sword25/fmv/theora_decoder.cpp +++ b/engines/sword25/fmv/theora_decoder.cpp @@ -55,6 +55,7 @@ TheoraDecoder::TheoraDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundT _theoraPacket = 0; _vorbisPacket = 0; + _theoraDecode = 0; _theoraSetup = 0; _stateFlag = false; -- cgit v1.2.3