2017-04-24 18:28:50 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2017-04-22 13:19:21 -04:00
|
|
|
#include "MovieManager.h"
|
2017-04-24 18:28:50 -04:00
|
|
|
#include "../Utilities/ZipReader.h"
|
2018-07-02 18:46:02 -04:00
|
|
|
#include "INotificationListener.h"
|
2019-11-14 20:15:54 -05:00
|
|
|
#include "BatteryManager.h"
|
2017-04-22 13:19:21 -04:00
|
|
|
|
2017-11-19 23:08:23 -05:00
|
|
|
class VirtualFile;
|
2018-07-01 15:21:05 -04:00
|
|
|
class Console;
|
2017-11-19 23:08:23 -05:00
|
|
|
|
2019-11-14 20:15:54 -05:00
|
|
|
class BizhawkMovie : public IMovie, public INotificationListener, public IBatteryProvider, public std::enable_shared_from_this<BizhawkMovie>
|
2017-04-22 13:19:21 -04:00
|
|
|
{
|
|
|
|
private:
|
2017-04-24 18:28:50 -04:00
|
|
|
bool InitializeGameData(ZipReader &reader);
|
|
|
|
bool InitializeInputData(ZipReader &reader);
|
2017-11-19 23:08:23 -05:00
|
|
|
void Stop();
|
2017-04-24 18:28:50 -04:00
|
|
|
|
|
|
|
protected:
|
2018-07-01 15:21:05 -04:00
|
|
|
shared_ptr<Console> _console;
|
|
|
|
|
2017-04-22 13:19:21 -04:00
|
|
|
vector<uint32_t> _systemActionByFrame;
|
2017-11-19 23:08:23 -05:00
|
|
|
vector<string> _dataByFrame[4];
|
2017-04-22 13:19:21 -04:00
|
|
|
bool _isPlaying = false;
|
|
|
|
RamPowerOnState _originalPowerOnState;
|
2018-07-13 22:19:26 -04:00
|
|
|
|
2017-04-22 13:19:21 -04:00
|
|
|
public:
|
2018-07-01 15:21:05 -04:00
|
|
|
BizhawkMovie(shared_ptr<Console>);
|
2017-04-22 13:19:21 -04:00
|
|
|
virtual ~BizhawkMovie();
|
|
|
|
|
2017-11-19 23:08:23 -05:00
|
|
|
bool SetInput(BaseControlDevice *device) override;
|
|
|
|
bool Play(VirtualFile &file) override;
|
2017-04-22 13:19:21 -04:00
|
|
|
bool IsPlaying() override;
|
2018-07-02 18:46:02 -04:00
|
|
|
|
|
|
|
// Inherited via INotificationListener
|
|
|
|
virtual void ProcessNotification(ConsoleNotificationType type, void * parameter) override;
|
2019-11-14 20:15:54 -05:00
|
|
|
virtual vector<uint8_t> LoadBattery(string extension) override;
|
2017-04-22 13:19:21 -04:00
|
|
|
};
|