diff --git a/SourceGen/LineListGen.cs b/SourceGen/LineListGen.cs index 8c434aa..dfdcfb2 100644 --- a/SourceGen/LineListGen.cs +++ b/SourceGen/LineListGen.cs @@ -788,21 +788,6 @@ namespace SourceGen { return true; } - ///// - ///// Removes all header lines from the line list. - ///// - //private void ClearHeaderLines() { - // // Find the first non-header item. - // int endIndex = FindLineByOffset(mLineList, 0); - // if (endIndex == 0) { - // // no header lines present - // Debug.WriteLine("No header lines found"); - // return; - // } - // Debug.WriteLine("Removing " + endIndex + " header lines"); - // mLineList.RemoveRange(0, endIndex); - //} - /// /// Generates a synthetic offset for the FileOffset field from an index value. The /// index arg is the index of an entry in the DisasmProject.ActiveDefSymbolList. @@ -823,6 +808,10 @@ namespace SourceGen { return offset + (1 << 24); } + // NOTE: the two functions above are tied to the implementation of the function + // below: we output the lines in the order in which they appear in ActiveDefSymbolList. + // If we want to get fancy and sort them, we'll need to do some additional work. + /// /// Generates the header lines (header comment, EQU directives). /// @@ -834,7 +823,6 @@ namespace SourceGen { PseudoOp.PseudoOpNames opNames) { List tmpLines = new List(); Line line; - FormattedParts parts; // Check for header comment. if (proj.LongComments.TryGetValue(Line.HEADER_COMMENT_OFFSET, @@ -853,7 +841,7 @@ namespace SourceGen { null, defSym.DataDescriptor, defSym.Value, 1, PseudoOp.FormatNumericOpFlags.None); string comment = formatter.FormatEolComment(defSym.Comment); - parts = FormattedParts.CreateEquDirective(defSym.Label, + FormattedParts parts = FormattedParts.CreateEquDirective(defSym.Label, formatter.FormatPseudoOp(opNames.EquDirective), valueStr, comment); line.Parts = parts; diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index 3ef4737..00b5cd5 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -3270,6 +3270,11 @@ namespace SourceGen { sourceStr = "???"; } extraStr = "Source: " + sourceStr; + if (defSym.SymbolType == Symbol.Type.Constant) { + extraStr += " (constant)"; + } else { + extraStr += " (address)"; + } } break; case LineListGen.Line.Type.LocalVariableTable: diff --git a/SourceGen/WpfGui/EditComment.xaml b/SourceGen/WpfGui/EditComment.xaml index 33cccd6..da25a65 100644 --- a/SourceGen/WpfGui/EditComment.xaml +++ b/SourceGen/WpfGui/EditComment.xaml @@ -30,6 +30,7 @@ limitations under the License. @@ -69,7 +69,7 @@ limitations under the License. + FontFamily="{StaticResource GeneralMonoFont}" ScrollViewer.CanContentScroll="True"/> diff --git a/SourceGen/WpfGui/EditProjectProperties.xaml.cs b/SourceGen/WpfGui/EditProjectProperties.xaml.cs index e453fce..cebc6d8 100644 --- a/SourceGen/WpfGui/EditProjectProperties.xaml.cs +++ b/SourceGen/WpfGui/EditProjectProperties.xaml.cs @@ -452,6 +452,8 @@ namespace SourceGen.WpfGui { // the symbol at the correct sorted position. LoadProjectSymbols(); UpdateControls(); + + okButton.Focus(); } } @@ -485,6 +487,8 @@ namespace SourceGen.WpfGui { IsDirty = true; LoadProjectSymbols(); UpdateControls(); + + okButton.Focus(); } }