1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-04 01:29:34 +00:00

Fix display of project/platform cross-ref adjustments

We were trying to use the in-file calculation for an external
address, so the adjustment was always zero.

Also, don't pass a fill brush for wireframe rendering.  (No change
in behavior.)
This commit is contained in:
Andy McFadden 2020-03-17 13:49:14 -07:00
parent 1da98d8628
commit 63b84dcece
2 changed files with 3 additions and 4 deletions

View File

@ -1541,9 +1541,8 @@ namespace SourceGen {
sym.SymbolSource == Symbol.Source.Platform) {
DefSymbol defSym = sym as DefSymbol;
int adj = 0;
if (operandOffset >= 0) {
adj = defSym.Value - operandOffset;
}
Debug.Assert(operandOffset < 0); // outside file scope
adj = defSym.Value - attr.OperandAddress;
defSym.Xrefs.Add(
new XrefSet.Xref(offset, true, xrefType, accType, adj));
} else {

View File

@ -311,7 +311,7 @@ namespace SourceGen {
using (DrawingContext dc = dv.RenderOpen()) {
dc.DrawRectangle(Brushes.Black, null, new Rect(0, 0, bounds.Width, bounds.Height));
Pen pen = new Pen(Brushes.White, 1.0);
dc.DrawGeometry(Brushes.White, pen, geo);
dc.DrawGeometry(null, pen, geo);
}
bitmap.Render(dv);