diff options
author | Eugene Sandulenko | 2010-09-01 08:42:51 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:23:29 +0000 |
commit | 3b80a9378223b807a1ec3865bdeb94ba55d508e3 (patch) | |
tree | 176463cde409284861cc7c78239197d89597c06b /engines/sword25/fmv | |
parent | 3d3f1db15c50c9b675e29e0a10ee896fd8928445 (diff) | |
download | scummvm-rg350-3b80a9378223b807a1ec3865bdeb94ba55d508e3.tar.gz scummvm-rg350-3b80a9378223b807a1ec3865bdeb94ba55d508e3.tar.bz2 scummvm-rg350-3b80a9378223b807a1ec3865bdeb94ba55d508e3.zip |
SWORD25: Put back changes accidentally removed in previous merge.
svn-id: r53301
Diffstat (limited to 'engines/sword25/fmv')
-rw-r--r-- | engines/sword25/fmv/movieplayer.cpp | 14 | ||||
-rw-r--r-- | 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<const byte *>(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; |