mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 14:39:01 +01:00
The arrows are back in the codeview!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@305 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a47f8cbe9a
commit
90cf2c12c3
@ -327,6 +327,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
|||||||
wxPen currentPen(_T("#000000"));
|
wxPen currentPen(_T("#000000"));
|
||||||
wxPen selPen(_T("#808080"));
|
wxPen selPen(_T("#808080"));
|
||||||
nullPen.SetStyle(wxTRANSPARENT);
|
nullPen.SetStyle(wxTRANSPARENT);
|
||||||
|
currentPen.SetStyle(wxSOLID);
|
||||||
|
|
||||||
wxBrush currentBrush(_T("#FFEfE8"));
|
wxBrush currentBrush(_T("#FFEfE8"));
|
||||||
wxBrush pcBrush(_T("#70FF70"));
|
wxBrush pcBrush(_T("#70FF70"));
|
||||||
@ -420,7 +421,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
|||||||
sscanf(mojs + 2, "%08x", &offs);
|
sscanf(mojs + 2, "%08x", &offs);
|
||||||
branches[numBranches].src = rowY1 + rowHeight / 2;
|
branches[numBranches].src = rowY1 + rowHeight / 2;
|
||||||
branches[numBranches].srcAddr = address / align;
|
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());
|
sprintf(desc, "-->%s", debugger->getDescription(offs).c_str());
|
||||||
dc.SetTextForeground(_T("#600060"));
|
dc.SetTextForeground(_T("#600060"));
|
||||||
}
|
}
|
||||||
@ -467,25 +468,25 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dc.SetPen(currentPen);
|
dc.SetPen(currentPen);
|
||||||
/*
|
|
||||||
for (i = 0; i < numBranches; i++)
|
for (i = 0; i < numBranches; i++)
|
||||||
{
|
{
|
||||||
int x = 250 + (branches[i].srcAddr % 9) * 8;
|
int x = 300 + (branches[i].srcAddr % 9) * 8;
|
||||||
MoveToEx(hdc, x-2, branches[i].src, 0);
|
_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(dc, x+2, branches[i].src);
|
||||||
LineTo(hdc, x+2, branches[i].dst);
|
_LineTo(dc, x+2, branches[i].dst);
|
||||||
LineTo(hdc, x-4, branches[i].dst);
|
_LineTo(dc, x-4, branches[i].dst);
|
||||||
|
|
||||||
MoveToEx(hdc, x, branches[i].dst - 4,0);
|
_MoveTo(x, branches[i].dst - 4);
|
||||||
LineTo(hdc, x-4, branches[i].dst);
|
_LineTo(dc, x-4, branches[i].dst);
|
||||||
LineTo(hdc, x+1, branches[i].dst+5);
|
_LineTo(dc, x+1, branches[i].dst+5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LineTo(hdc, x+4, branches[i].src);
|
_LineTo(dc, x+4, branches[i].src);
|
||||||
//MoveToEx(hdc,x+2,branches[i].dst-4,0);
|
//MoveToEx(hdc,x+2,branches[i].dst-4,0);
|
||||||
//LineTo(hdc,x+6,branches[i].dst);
|
//LineTo(hdc,x+6,branches[i].dst);
|
||||||
//LineTo(hdc,x+1,branches[i].dst+5);
|
//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,branches[i].dst+4);
|
||||||
|
|
||||||
//LineTo(hdc,x-2,branches[i].dst);
|
//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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,10 @@ class CCodeView
|
|||||||
bool hasFocus;
|
bool hasFocus;
|
||||||
bool showHex;
|
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()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user