Core/Movie: Refactor to class, move to System.

A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
This commit is contained in:
Admiral H. Curtiss 2024-01-13 13:14:48 +01:00
commit 95cba6be2b
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
32 changed files with 717 additions and 609 deletions

View file

@ -26,6 +26,7 @@
#include "Core/HW/SystemTimers.h"
#include "Core/HW/VideoInterface.h"
#include "Core/HW/WII_IPC.h"
#include "Core/Movie.h"
#include "Core/PowerPC/Interpreter/Interpreter.h"
#include "Core/PowerPC/JitInterface.h"
#include "Core/PowerPC/PowerPC.h"
@ -52,7 +53,7 @@ struct System::Impl
m_mmu(system, m_memory, m_power_pc), m_processor_interface(system),
m_serial_interface(system), m_system_timers(system), m_video_interface(system),
m_interpreter(system, m_power_pc.GetPPCState(), m_mmu), m_jit_interface(system),
m_fifo_player(system), m_fifo_recorder(system)
m_fifo_player(system), m_fifo_recorder(system), m_movie(system)
{
}
@ -93,6 +94,7 @@ struct System::Impl
VideoCommon::CustomAssetLoader m_custom_asset_loader;
FifoPlayer m_fifo_player;
FifoRecorder m_fifo_recorder;
Movie::MovieManager m_movie;
};
System::System() : m_impl{std::make_unique<Impl>(*this)}
@ -248,6 +250,11 @@ PowerPC::MMU& System::GetMMU() const
return m_impl->m_mmu;
}
Movie::MovieManager& System::GetMovie() const
{
return m_impl->m_movie;
}
PixelEngine::PixelEngineManager& System::GetPixelEngine() const
{
return m_impl->m_pixel_engine;