summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/src
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-08-24 22:22:55 +0000
committerhrydgard <hrydgard@gmail.com>2008-08-24 22:22:55 +0000
commit90cf2c12c36b48121580730d3cb481b9fe17d27d (patch)
treef66fcd7b5ec85556316a10398e18ec17e8ed0794 /Source/Core/DebuggerWX/src
parenta47f8cbe9a8ee0270fab60fd3a3fa6f206a203f2 (diff)
The arrows are back in the codeview!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@305 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/src')
-rw-r--r--Source/Core/DebuggerWX/src/CodeView.cpp38
-rw-r--r--Source/Core/DebuggerWX/src/CodeView.h4
2 files changed, 27 insertions, 15 deletions
diff --git a/Source/Core/DebuggerWX/src/CodeView.cpp b/Source/Core/DebuggerWX/src/CodeView.cpp
index 28c8a6d339..d6aab45ac9 100644
--- a/Source/Core/DebuggerWX/src/CodeView.cpp
+++ b/Source/Core/DebuggerWX/src/CodeView.cpp
@@ -327,6 +327,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
wxPen currentPen(_T("#000000"));
wxPen selPen(_T("#808080"));
nullPen.SetStyle(wxTRANSPARENT);
+ currentPen.SetStyle(wxSOLID);
wxBrush currentBrush(_T("#FFEfE8"));
wxBrush pcBrush(_T("#70FF70"));
@@ -420,7 +421,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
sscanf(mojs + 2, "%08x", &offs);
branches[numBranches].src = rowY1 + rowHeight / 2;
branches[numBranches].srcAddr = address / align;
- branches[numBranches++].dst = (int)(rowY1 + ((s64)offs - (s64)address) * rowHeight / align + rowHeight / 2);
+ branches[numBranches++].dst = (int)(rowY1 + ((s64)(u32)offs - (s64)(u32)address) * rowHeight / align + rowHeight / 2);
sprintf(desc, "-->%s", debugger->getDescription(offs).c_str());
dc.SetTextForeground(_T("#600060"));
}
@@ -467,25 +468,25 @@ void CCodeView::OnPaint(wxPaintEvent& event)
}
dc.SetPen(currentPen);
- /*
- for (i = 0; i < numBranches; i++)
- {
- int x = 250 + (branches[i].srcAddr % 9) * 8;
- MoveToEx(hdc, x-2, branches[i].src, 0);
+
+ for (i = 0; i < numBranches; i++)
+ {
+ int x = 300 + (branches[i].srcAddr % 9) * 8;
+ _MoveTo(x-2, branches[i].src);
- if (branches[i].dst < rect.bottom + 200 && branches[i].dst > -200)
+ if (branches[i].dst < rc.height + 400 && branches[i].dst > -400)
{
- LineTo(hdc, x+2, branches[i].src);
- LineTo(hdc, x+2, branches[i].dst);
- LineTo(hdc, x-4, branches[i].dst);
+ _LineTo(dc, x+2, branches[i].src);
+ _LineTo(dc, x+2, branches[i].dst);
+ _LineTo(dc, x-4, branches[i].dst);
- MoveToEx(hdc, x, branches[i].dst - 4,0);
- LineTo(hdc, x-4, branches[i].dst);
- LineTo(hdc, x+1, branches[i].dst+5);
+ _MoveTo(x, branches[i].dst - 4);
+ _LineTo(dc, x-4, branches[i].dst);
+ _LineTo(dc, x+1, branches[i].dst+5);
}
else
{
- LineTo(hdc, x+4, branches[i].src);
+ _LineTo(dc, x+4, branches[i].src);
//MoveToEx(hdc,x+2,branches[i].dst-4,0);
//LineTo(hdc,x+6,branches[i].dst);
//LineTo(hdc,x+1,branches[i].dst+5);
@@ -493,7 +494,14 @@ void CCodeView::OnPaint(wxPaintEvent& event)
//LineTo(hdc,x,branches[i].dst+4);
//LineTo(hdc,x-2,branches[i].dst);
- }*/
+ }
}
+void CCodeView::_LineTo(wxPaintDC &dc, int x, int y)
+{
+ dc.DrawLine(lx, ly, x, y);
+ lx = x;
+ ly = y;
+}
+
diff --git a/Source/Core/DebuggerWX/src/CodeView.h b/Source/Core/DebuggerWX/src/CodeView.h
index 0ff8c696d7..612fa0ccd9 100644
--- a/Source/Core/DebuggerWX/src/CodeView.h
+++ b/Source/Core/DebuggerWX/src/CodeView.h
@@ -72,6 +72,10 @@ class CCodeView
bool hasFocus;
bool showHex;
+ int lx, ly;
+ void _MoveTo(int x, int y) {lx = x; ly = y;}
+ void _LineTo(wxPaintDC &dc, int x, int y);
+
DECLARE_EVENT_TABLE()
};