Pica: Create 'State' structure and move state memory there.

This commit is contained in:
bunnei 2015-05-13 23:29:27 -04:00
parent 4c207798b4
commit 1b42d55a9d
15 changed files with 461 additions and 438 deletions

View file

@ -178,7 +178,7 @@ void GraphicsFramebufferWidget::OnUpdate()
{
// TODO: Store a reference to the registers in the debug context instead of accessing them directly...
const auto& framebuffer = Pica::registers.framebuffer;
const auto& framebuffer = Pica::g_state.regs.framebuffer;
framebuffer_address = framebuffer.GetColorBufferPhysicalAddress();
framebuffer_width = framebuffer.GetWidth();
@ -191,7 +191,7 @@ void GraphicsFramebufferWidget::OnUpdate()
case Source::DepthBuffer:
{
const auto& framebuffer = Pica::registers.framebuffer;
const auto& framebuffer = Pica::g_state.regs.framebuffer;
framebuffer_address = framebuffer.GetDepthBufferPhysicalAddress();
framebuffer_width = framebuffer.GetWidth();