2017-04-18 22:39:45 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2017-04-22 13:19:21 -04:00
|
|
|
#include "MessageManager.h"
|
|
|
|
#include "EmulationSettings.h"
|
2017-11-19 23:08:23 -05:00
|
|
|
#include "IInputProvider.h"
|
2017-12-22 15:08:58 -05:00
|
|
|
#include "Types.h"
|
2017-04-18 22:39:45 -04:00
|
|
|
|
2017-11-19 23:08:23 -05:00
|
|
|
class MovieRecorder;
|
|
|
|
class VirtualFile;
|
|
|
|
|
|
|
|
class IMovie : public IInputProvider
|
2017-04-18 22:39:45 -04:00
|
|
|
{
|
2017-04-22 13:19:21 -04:00
|
|
|
protected:
|
|
|
|
void EndMovie()
|
|
|
|
{
|
|
|
|
MessageManager::DisplayMessage("Movies", "MovieEnded");
|
|
|
|
MessageManager::SendNotification(ConsoleNotificationType::MovieEnded);
|
|
|
|
if(EmulationSettings::CheckFlag(EmulationFlags::PauseOnMovieEnd)) {
|
|
|
|
EmulationSettings::SetFlags(EmulationFlags::Paused);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-18 22:39:45 -04:00
|
|
|
public:
|
2017-11-19 23:08:23 -05:00
|
|
|
virtual bool Play(VirtualFile &file) = 0;
|
2017-04-18 22:39:45 -04:00
|
|
|
virtual bool IsPlaying() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class MovieManager
|
|
|
|
{
|
|
|
|
private:
|
2017-11-19 23:08:23 -05:00
|
|
|
static shared_ptr<IMovie> _player;
|
|
|
|
static shared_ptr<MovieRecorder> _recorder;
|
2017-04-18 22:39:45 -04:00
|
|
|
|
|
|
|
public:
|
2017-12-22 15:08:58 -05:00
|
|
|
static void Record(RecordMovieOptions options);
|
2017-11-19 23:08:23 -05:00
|
|
|
static void Play(VirtualFile file);
|
2017-04-18 22:39:45 -04:00
|
|
|
static void Stop();
|
|
|
|
static bool Playing();
|
|
|
|
static bool Recording();
|
|
|
|
};
|