From e187c55bdd1d553aada5fd165c965d355e425383 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 24 Jan 2016 01:29:44 -0500 Subject: OpcodeDecoder: Add namespace --- Source/Core/VideoCommon/OpcodeDecoding.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp') diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp index 99a801a8f3..3af3337b9e 100644 --- a/Source/Core/VideoCommon/OpcodeDecoding.cpp +++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp @@ -28,8 +28,11 @@ #include "VideoCommon/VideoCommon.h" #include "VideoCommon/XFMemory.h" - bool g_bRecordFifoData = false; + +namespace OpcodeDecoder +{ + static bool s_bFifoErrorSeen = false; static u32 InterpretDisplayList(u32 address, u32 size) @@ -49,7 +52,7 @@ static u32 InterpretDisplayList(u32 address, u32 size) // temporarily swap dl and non-dl (small "hack" for the stats) Statistics::SwapDL(); - OpcodeDecoder_Run(DataReader(startAddress, startAddress + size), &cycles, true); + Run(DataReader(startAddress, startAddress + size), &cycles, true); INCSTAT(stats.thisFrame.numDListsCalled); // un-swap @@ -67,7 +70,7 @@ static void InterpretDisplayListPreprocess(u32 address, u32 size) if (startAddress != nullptr) { - OpcodeDecoder_Run(DataReader(startAddress, startAddress + size), nullptr, true); + Run(DataReader(startAddress, startAddress + size), nullptr, true); } } @@ -120,18 +123,17 @@ static void UnknownOpcode(u8 cmd_byte, void *buffer, bool preprocess) } } -void OpcodeDecoder_Init() +void Init() { s_bFifoErrorSeen = false; } - -void OpcodeDecoder_Shutdown() +void Shutdown() { } template -u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list) +u8* Run(DataReader src, u32* cycles, bool in_display_list) { u32 totalCycles = 0; u8* opcodeStart; @@ -314,5 +316,7 @@ end: return opcodeStart; } -template u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list); -template u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list); +template u8* Run(DataReader src, u32* cycles, bool in_display_list); +template u8* Run(DataReader src, u32* cycles, bool in_display_list); + +} // namespace OpcodeDecoder -- cgit v1.2.3