Interpreter: Move global state into class, move instance to System.

This commit is contained in:
Admiral H. Curtiss 2023-03-17 00:24:22 +01:00
commit 3d67c11b91
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
11 changed files with 80 additions and 53 deletions

View file

@ -22,6 +22,7 @@
#include "Core/HW/SI/SI.h"
#include "Core/HW/Sram.h"
#include "Core/HW/VideoInterface.h"
#include "Core/PowerPC/Interpreter/Interpreter.h"
#include "Core/PowerPC/PowerPC.h"
#include "IOS/USB/Emulated/Skylander.h"
#include "VideoCommon/CommandProcessor.h"
@ -39,7 +40,7 @@ struct System::Impl
: m_audio_interface(system), m_core_timing(system), m_dsp(system), m_dvd_interface(system),
m_dvd_thread(system), m_expansion_interface(system), m_gp_fifo(system), m_memory(system),
m_ppc_state(PowerPC::ppcState), m_processor_interface(system), m_serial_interface(system),
m_video_interface(system)
m_video_interface(system), m_interpreter(system, m_ppc_state)
{
}
@ -70,6 +71,7 @@ struct System::Impl
Sram m_sram;
VertexShaderManager m_vertex_shader_manager;
VideoInterface::VideoInterfaceManager m_video_interface;
Interpreter m_interpreter;
};
System::System() : m_impl{std::make_unique<Impl>(*this)}
@ -175,6 +177,11 @@ HSP::HSPManager& System::GetHSP() const
return m_impl->m_hsp;
}
Interpreter& System::GetInterpreter() const
{
return m_impl->m_interpreter;
}
IOS::HLE::USB::SkylanderPortal& System::GetSkylanderPortal() const
{
return m_impl->m_skylander_portal;