-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branches render independantly, reusing the listbox control.
- Loading branch information
1 parent
f73509a
commit 6082230
Showing
8 changed files
with
140 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration> | ||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2569,36 +2569,23 @@ void PaintColumnSeparator(Graphics g) | |
|
||
void GetBrushes(Relocation r, long remainder, ref Brush foreColor, ref Brush backColor) | ||
{ | ||
foreColor = r.Linked.Count > 0 ? RelocationBrush : foreColor; | ||
bool single = r.Linked.Count > 0 && r.Branched.Count == 0 | ||
|| (r.Branched.Count > 0 && r.Linked.Count == 0); | ||
|
||
bool branch = (r._section.HasCode && r.Code is PPCBranch && _sectionEditor.highlightBlr.Checked); | ||
bool cmd = r.Command != null && ((r.Command.IsHalf && remainder > 1) || (!r.Command.IsHalf)); | ||
foreColor = r.Linked.Count > 0 ? RelocationBrush : | ||
r.Branched.Count > 0 ? new SolidBrush(Color.Blue) : | ||
foreColor; | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
Sammi-Husky
Author
Collaborator
|
||
if (_sectionEditor._section.HasCode) | ||
{ | ||
//Get the currently selected branch code. | ||
//This is not the byte that is being painted! | ||
PPCBranch branchOp = _sectionEditor.TargetBranch; | ||
if (branchOp != null) | ||
{ | ||
int index = | ||
!branchOp.Absolute ? | ||
(_sectionEditor.TargetRelocation._index * 4 + branchOp.DataOffset).RoundDown(4) / 4 : | ||
-1; //Absolute from start of section, start of file, or start of memory? | ||
|
||
if (index == r._index) | ||
{ | ||
backColor = BranchOffsetBrush; | ||
return; | ||
} | ||
} | ||
} | ||
bool blr = (r._section.HasCode && r.Code is PPCblr && _sectionEditor.highlightBlr.Checked); | ||
bool branch = (r._section.HasCode && r.Code is PPCBranch && !(blr || r.Code is PPCbctr)); | ||
bool cmd = r.Command != null && ((r.Command.IsHalf && remainder > 1) || (!r.Command.IsHalf)); | ||
|
||
backColor = | ||
r._selected ? SelectedBrush : //1st: is this selected? | ||
cmd ? CommandBrush : //2nd: is this a command? | ||
branch ? BranchBrush : //3rd: is this a branch? | ||
null; //4th: this is nothing important. | ||
blr ? BlrBrush : //3rd: is this a blr? | ||
branch ? BranchOffsetBrush : //4th: Is this a branch? | ||
null; //5th: this is nothing important. | ||
} | ||
|
||
void PaintByte(byte b, long offset, bool isSelectedByte, bool isKeyInterpreterActive, Graphics g, Brush foreBrush, Point gridPoint) | ||
|
@@ -3648,21 +3635,21 @@ public Brush CommandBrush | |
/// Gets or sets the color for code branch relocations. | ||
/// </summary> | ||
[Category("Hex"), Description("Gets or sets the color for code branch relocations.")] | ||
public Color BranchColor | ||
public Color BlrColor | ||
{ | ||
get { return _branchColor; } | ||
set { _branchColor = value; Invalidate(); } | ||
} Color _branchColor = Color.FromArgb(255, 255, 100); | ||
get { return _blrColor; } | ||
set { _blrColor = value; Invalidate(); } | ||
} Color _blrColor = Color.FromArgb(255, 255, 100); | ||
[Browsable(false)] | ||
public Brush BranchBrush | ||
public Brush BlrBrush | ||
{ | ||
get | ||
{ | ||
return _branchBrush ?? | ||
(_branchBrush = new SolidBrush(_branchColor)); | ||
return _blrBrush ?? | ||
(_blrBrush = new SolidBrush(_blrColor)); | ||
} | ||
} | ||
Brush _branchBrush = null; | ||
Brush _blrBrush = null; | ||
|
||
/// <summary> | ||
/// Gets or sets the color for relocations that are branched to. | ||
|
@@ -3672,7 +3659,8 @@ public Color BranchOffsetColor | |
{ | ||
get { return _branchOffsetColor; } | ||
set { _branchOffsetColor = value; Invalidate(); } | ||
} Color _branchOffsetColor = Color.MediumPurple; | ||
} Color _branchOffsetColor = Color.Plum; | ||
|
||
[Browsable(false)] | ||
public Brush BranchOffsetBrush | ||
{ | ||
|
7 changes: 2 additions & 5 deletions
7
BrawlLib/System/Windows/Forms/Section Editor/SectionEditor.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No doubt there is a better place to put this code..but this will suffice for now.