2008-09-16 07:14:07 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
2021-12-26 18:47:58 +01:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-02-18 02:34:26 +01:00
|
|
|
*
|
2008-09-16 07:14:07 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2014-02-18 02:34:26 +01:00
|
|
|
*
|
2008-09-16 07:14:07 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2021-12-26 18:47:58 +01:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2008-09-16 07:14:07 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TOLTECS_MOVIE_H
|
|
|
|
#define TOLTECS_MOVIE_H
|
|
|
|
|
2011-02-09 03:03:46 +00:00
|
|
|
#include "audio/mixer.h" // for Audio::SoundHandle
|
2008-09-16 07:14:07 +00:00
|
|
|
|
2016-04-14 16:10:21 +03:00
|
|
|
namespace Audio {
|
|
|
|
class QueuingAudioStream;
|
|
|
|
}
|
|
|
|
|
2008-09-16 07:14:07 +00:00
|
|
|
namespace Toltecs {
|
|
|
|
|
|
|
|
class MoviePlayer {
|
|
|
|
|
|
|
|
public:
|
2008-09-22 20:55:26 +00:00
|
|
|
MoviePlayer(ToltecsEngine *vm);
|
|
|
|
~MoviePlayer();
|
2008-09-16 07:14:07 +00:00
|
|
|
|
|
|
|
void playMovie(uint resIndex);
|
2012-09-26 04:17:31 +02:00
|
|
|
|
2013-01-02 22:18:09 +01:00
|
|
|
bool isPlaying() { return _isPlaying; }
|
|
|
|
|
2008-09-16 07:14:07 +00:00
|
|
|
protected:
|
2008-09-22 20:55:26 +00:00
|
|
|
ToltecsEngine *_vm;
|
2010-01-09 17:23:04 +00:00
|
|
|
Audio::QueuingAudioStream *_audioStream;
|
2008-09-22 20:55:26 +00:00
|
|
|
Audio::SoundHandle _audioStreamHandle;
|
|
|
|
|
2013-01-02 22:18:09 +01:00
|
|
|
bool _isPlaying;
|
|
|
|
|
2013-05-14 01:44:12 +03:00
|
|
|
uint32 _framesPerSoundChunk;
|
|
|
|
int32 _lastPrefetchOfs, _endPos;
|
2008-09-16 07:14:07 +00:00
|
|
|
|
|
|
|
void unpackPalette(byte *source, byte *dest, int elemCount, int elemSize);
|
|
|
|
void unpackRle(byte *source, byte *dest);
|
2012-09-26 04:17:31 +02:00
|
|
|
|
2008-09-22 20:55:26 +00:00
|
|
|
void fetchAudioChunks();
|
2012-09-26 04:17:31 +02:00
|
|
|
|
2008-10-20 19:54:29 +00:00
|
|
|
bool handleInput();
|
2012-09-26 04:17:31 +02:00
|
|
|
|
2008-09-16 07:14:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Toltecs
|
|
|
|
|
|
|
|
#endif /* TOLTECS_MOVIE_H */
|