aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/animation.h')
-rw-r--r--engines/agos/animation.h57
1 files changed, 47 insertions, 10 deletions
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 4e8f15e33a..822ac8ee73 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -30,13 +30,17 @@
#include "common/stream.h"
#include "graphics/dxa_player.h"
+#include "graphics/smk_player.h"
#include "sound/mixer.h"
namespace AGOS {
class AGOSEngine;
-class MoviePlayer : public Graphics::DXAPlayer {
+class MoviePlayer {
+ friend class MoviePlayerDXA;
+ friend class MoviePlayerSMK;
+
AGOSEngine *_vm;
Audio::Mixer *_mixer;
@@ -44,33 +48,66 @@ class MoviePlayer : public Graphics::DXAPlayer {
Audio::SoundHandle _bgSound;
Audio::AudioStream *_bgSoundStream;
- Audio::SoundHandle _omniTVSound;
- Common::SeekableReadStream *_omniTVFile;
-
- bool _omniTV;
bool _leftButtonDown;
bool _rightButtonDown;
+ bool _skipMovie;
uint32 _ticks;
+ uint16 _frameSkipped;
char baseName[40];
+public:
+ MoviePlayer(AGOSEngine *vm);
+ virtual ~MoviePlayer();
+
+ virtual bool load() = 0;
+ virtual void play();
+ virtual void playVideo() {};
+ virtual void nextFrame() {};
+ virtual void stopVideo() {};
+
+private:
+ virtual void handleNextFrame();
+ virtual bool processFrame() = 0;
+ virtual void startSound() {};
+};
+
+class MoviePlayerDXA : public MoviePlayer, ::Graphics::DXAPlayer {
static const char *_sequenceList[90];
uint8 _sequenceNum;
public:
- MoviePlayer(AGOSEngine *vm, Audio::Mixer *mixer);
+ MoviePlayerDXA(AGOSEngine *vm, const char *name);
- bool load(const char *filename);
- void play();
+ bool load();
+ void playVideo();
void nextFrame();
+ virtual void stopVideo();
protected:
- virtual void setPalette(byte *pal);
+ void setPalette(byte *pal);
+
private:
- void playOmniTV();
+ void handleNextFrame();
+ bool processFrame();
+ void startSound();
+};
+
+class MoviePlayerSMK : public MoviePlayer, ::Graphics::SMKPlayer {
+public:
+ MoviePlayerSMK(AGOSEngine *vm, const char *name);
+ bool load();
+ void playVideo();
+ void nextFrame();
+ virtual void stopVideo();
+protected:
+ void setPalette(byte *pal);
+private:
void handleNextFrame();
bool processFrame();
void startSound();
};
+MoviePlayer *makeMoviePlayer(AGOSEngine *vm, const char *name);
+
} // End of namespace AGOS
#endif