Skip to content

Commit 3cdd05e

Browse files
committed
Code refactoring
1 parent 0b6001e commit 3cdd05e

File tree

7 files changed

+16
-24
lines changed

7 files changed

+16
-24
lines changed

GenOpCodes/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2019.2.1.420")>
35-
<Assembly: AssemblyFileVersion("2019.2.1.420")>
34+
<Assembly: AssemblyVersion("2019.2.13.422")>
35+
<Assembly: AssemblyFileVersion("2019.2.13.422")>

RunTests/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2019.2.1.719")>
35-
<Assembly: AssemblyFileVersion("2019.2.1.719")>
34+
<Assembly: AssemblyVersion("2019.2.13.721")>
35+
<Assembly: AssemblyFileVersion("2019.2.13.721")>

x8086NetEmu/Adapters/WebUI.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Public Class WebUI
1717

1818
Public Sub New(cpu As X8086, dBmp As DirectBitmap, syncObj As Object)
1919
Me.cpu = cpu
20-
Me.mBitmap = dBmp
2120
Me.syncObj = syncObj
21+
mBitmap = dBmp
2222

2323
CreateClient()
2424

@@ -188,7 +188,7 @@ Public Class WebUI
188188
Try
189189
SyncLock syncObj
190190
' FIXME: When using the VGA adapter and UseVRAM is true we need to send the VGA adapter's RAM instead
191-
Return CType(Bitmap, Byte())
191+
Return CType(mBitmap, Byte())
192192
End SyncLock
193193
Catch
194194
Return Nothing

x8086NetEmu/Helpers/ConsoleCrayon.vb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,9 @@ Public NotInheritable Class ConsoleCrayon
6565
If foreColor <> Console.ForegroundColor Then Console.ForegroundColor = foreColor
6666
If backColor <> Console.BackgroundColor Then Console.BackgroundColor = backColor
6767

68-
'If row = Console.WindowHeight - 1 AndAlso col + text.Length >= Console.WindowWidth Then
6968
Dim index As Integer = col + row * Console.WindowWidth
7069
Dim size As Integer = Console.WindowWidth * Console.WindowHeight
71-
If index + text.Length >= size Then
72-
'text = text.Substring(0, text.Length * 2 + col - Console.WindowWidth - 1)
73-
text = text.Substring(0, size - index - 1)
74-
End If
70+
If index + text.Length >= size Then text = text.Substring(0, size - index - 1)
7571

7672
Console.Write(text)
7773
End If
@@ -194,11 +190,7 @@ Public NotInheritable Class ConsoleCrayon
194190
Dim a As Double
195191

196192
If dy = 0 Then
197-
If dx > 0 Then
198-
a = 0
199-
Else
200-
a = 180
201-
End If
193+
a = If(dx > 0, 0, 180)
202194
Else
203195
a = Math.Atan(dy / dx) * toDegrees
204196
Select Case a
@@ -295,8 +287,8 @@ Public NotInheritable Class ConsoleCrayon
295287
End Select
296288
End Function
297289

298-
Private Const ESC = Chr(27) + "["
299-
Private Const ColorReset = ESC + "0m"
290+
Private Const ESC As String = Chr(27) + "["
291+
Private Const ColorReset As String = ESC + "0m"
300292
Private Shared Function GetAnsiColorControlCode(color As ConsoleColor, isForeground As Boolean) As String
301293
' lighter fg colours are 90 -> 97 rather than 30 -> 37
302294
' lighter bg colours are 100 -> 107 rather than 40 -> 47

x8086NetEmu/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2019.2.1.6526")>
35-
<Assembly: AssemblyFileVersion("2019.2.1.6519")>
34+
<Assembly: AssemblyVersion("2019.2.13.6529")>
35+
<Assembly: AssemblyFileVersion("2019.2.13.6522")>

x8086NetEmuConsole/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2019.2.1.789")>
35-
<Assembly: AssemblyFileVersion("2019.2.1.784")>
34+
<Assembly: AssemblyVersion("2019.2.13.792")>
35+
<Assembly: AssemblyFileVersion("2019.2.13.787")>

x8086NetEmuWinForms/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2019.2.1.6348")>
35-
<Assembly: AssemblyFileVersion("2019.2.1.6346")>
34+
<Assembly: AssemblyVersion("2019.2.13.6350")>
35+
<Assembly: AssemblyFileVersion("2019.2.13.6348")>

0 commit comments

Comments
 (0)