summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/BPMemory.cpp
diff options
context:
space:
mode:
authoromegadox <omegadox@gmail.com>2009-04-05 10:49:19 +0000
committeromegadox <omegadox@gmail.com>2009-04-05 10:49:19 +0000
commit1578e3e195bef30dc0bbf02aed39827ecd0d0e9c (patch)
treea46ddcb5fd5e7017f595bbf4d3c5b7bb7ec5e08a /Source/Core/VideoCommon/Src/BPMemory.cpp
parent07c1b7d7840d739963a8f074081605cb8eb7d7f6 (diff)
Recoded and moved BPStucts to VideoCommon. Some cleanup in PixelShaderManager. TODO: Have DX use BPFunctions. Note: Compiling DX plugin will not work atm.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2870 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPMemory.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/BPMemory.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/BPMemory.cpp b/Source/Core/VideoCommon/Src/BPMemory.cpp
index 3444f2fa74..a055fbcaeb 100644
--- a/Source/Core/VideoCommon/Src/BPMemory.cpp
+++ b/Source/Core/VideoCommon/Src/BPMemory.cpp
@@ -24,7 +24,7 @@
BPMemory bpmem;
// The plugin must implement this.
-void BPWritten(int addr, int changes, int newval);
+void BPWritten(const BreakPoint& bp);
// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg()
void LoadBPReg(u32 value0)
@@ -34,10 +34,14 @@ void LoadBPReg(u32 value0)
int oldval = ((u32*)&bpmem)[opcode];
int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask);
int changes = (oldval ^ newval) & 0xFFFFFF;
+
+ BreakPoint bp = {opcode, changes, newval};
+
//reset the mask register
if (opcode != 0xFE)
bpmem.bpMask = 0xFFFFFF;
- BPWritten(opcode, changes, newval);
+
+ BPWritten(bp);
}
// Called when loading a saved state.
@@ -57,7 +61,8 @@ void BPReload()
// Cases in which we DON'T want to reload the BP
continue;
default:
- BPWritten(i, 0xFFFFFF, ((u32*)&bpmem)[i]);
+ BreakPoint bp = {i, 0xFFFFFF, ((u32*)&bpmem)[i]};
+ BPWritten(bp);
}
}
}