Skip to content

Commit fe463c4

Browse files
Major refactor
1 parent bb4b23e commit fe463c4

19 files changed

+1649
-1327
lines changed

MupenSharp.sln

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.30804.86
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.2.32616.157
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MupenSharp", "MupenSharp\MupenSharp\MupenSharp.csproj", "{5459CC25-7D7B-43F1-9A18-4689EE04E760}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MupenSharp.Tests", "MupenSharp\MupenSharp.Tests\MupenSharp.Tests.csproj", "{CB91FF08-114B-40E6-9CFA-1F2A79C9EC95}"
9-
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTestingApp", "ConsoleTestingApp\ConsoleTestingApp.csproj", "{397AF93E-E91B-4E55-9EDC-6D3D812E488C}"
11-
EndProject
128
Global
139
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1410
Debug|Any CPU = Debug|Any CPU
@@ -19,14 +15,6 @@ Global
1915
{5459CC25-7D7B-43F1-9A18-4689EE04E760}.Debug|Any CPU.Build.0 = Debug|Any CPU
2016
{5459CC25-7D7B-43F1-9A18-4689EE04E760}.Release|Any CPU.ActiveCfg = Release|Any CPU
2117
{5459CC25-7D7B-43F1-9A18-4689EE04E760}.Release|Any CPU.Build.0 = Release|Any CPU
22-
{CB91FF08-114B-40E6-9CFA-1F2A79C9EC95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23-
{CB91FF08-114B-40E6-9CFA-1F2A79C9EC95}.Debug|Any CPU.Build.0 = Debug|Any CPU
24-
{CB91FF08-114B-40E6-9CFA-1F2A79C9EC95}.Release|Any CPU.ActiveCfg = Release|Any CPU
25-
{CB91FF08-114B-40E6-9CFA-1F2A79C9EC95}.Release|Any CPU.Build.0 = Release|Any CPU
26-
{397AF93E-E91B-4E55-9EDC-6D3D812E488C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27-
{397AF93E-E91B-4E55-9EDC-6D3D812E488C}.Debug|Any CPU.Build.0 = Debug|Any CPU
28-
{397AF93E-E91B-4E55-9EDC-6D3D812E488C}.Release|Any CPU.ActiveCfg = Release|Any CPU
29-
{397AF93E-E91B-4E55-9EDC-6D3D812E488C}.Release|Any CPU.Build.0 = Release|Any CPU
3018
EndGlobalSection
3119
GlobalSection(SolutionProperties) = preSolution
3220
HideSolutionNode = FALSE
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,34 @@
1-
#region Title Header
2-
3-
// Name: Phillip Smith
4-
//
5-
// Solution: MupenTasStudio
6-
// Project: MupenSharp
7-
// File Name: StringEncodingAttribute.cs
8-
//
9-
// Current Data:
10-
// 2021-07-11 11:21 AM
11-
//
12-
// Creation Date:
13-
// 2021-07-06 3:25 PM
14-
15-
#endregion
16-
17-
#region usings
18-
19-
using System;
1+
using System;
202
using JetBrains.Annotations;
213
using MupenSharp.Enums;
224

23-
#endregion
5+
namespace MupenSharp.Attributes;
246

25-
namespace MupenSharp.Attributes
7+
/// <summary>
8+
/// Attribute used to specify a string encoding and byte size.
9+
/// </summary>
10+
[UsedImplicitly]
11+
[AttributeUsage(AttributeTargets.Property)]
12+
public sealed class StringEncodingAttribute : Attribute
2613
{
2714
/// <summary>
28-
/// Attribute used to specify a string encoding and byte size.
15+
/// Sets the string encoding type for reading and writing
2916
/// </summary>
30-
[UsedImplicitly]
31-
[AttributeUsage(AttributeTargets.Property)]
32-
internal class StringEncodingAttribute : Attribute
33-
{
34-
/// <summary>
35-
/// Sets the string encoding type for reading and writing
36-
/// </summary>
37-
public virtual Encoding Encoding { get; }
17+
public Encoding Encoding { get; }
3818

39-
/// <summary>
40-
/// The size of the string in bytes
41-
/// </summary>
42-
public virtual int ByteSize { get; }
19+
/// <summary>
20+
/// The size of the string in bytes
21+
/// </summary>
22+
public int ByteSize { get; }
4323

44-
/// <summary>
45-
/// Attribute used to specify a string encoding and byte size.
46-
/// </summary>
47-
/// <param name="encoding">The type of encoding of the string.</param>
48-
/// <param name="byteSize">The number of bytes of the string.</param>
49-
public StringEncodingAttribute(Encoding encoding, int byteSize)
50-
{
51-
Encoding = encoding;
52-
ByteSize = byteSize;
53-
}
24+
/// <summary>
25+
/// Attribute used to specify a string encoding and byte size.
26+
/// </summary>
27+
/// <param name="encoding">The type of encoding of the string.</param>
28+
/// <param name="byteSize">The number of bytes of the string.</param>
29+
public StringEncodingAttribute(Encoding encoding, int byteSize)
30+
{
31+
Encoding = encoding;
32+
ByteSize = byteSize;
5433
}
5534
}
+11-28
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
1-
#region Title Header
1+
namespace MupenSharp.Enums;
22

3-
// Name: Phillip Smith
4-
//
5-
// Solution: MupenTasStudio
6-
// Project: MupenSharp
7-
// File Name: AnalogueInput.cs
8-
//
9-
// Current Data:
10-
// 2021-07-11 11:21 AM
11-
//
12-
// Creation Date:
13-
// 2021-07-09 12:58 PM
14-
15-
#endregion
16-
17-
namespace MupenSharp.Enums
3+
/// <summary>
4+
/// Enum for Analogue Inputs
5+
/// </summary>
6+
public enum AnalogueInput
187
{
198
/// <summary>
20-
/// Enum for Analogue Inputs
9+
/// The horizontal analogue coordinate
2110
/// </summary>
22-
public enum AnalogueInput
23-
{
24-
/// <summary>
25-
/// The horizontal analogue coordinate
26-
/// </summary>
27-
X,
11+
X,
2812

29-
/// <summary>
30-
/// The vertical analogue coordinate
31-
/// </summary>
32-
Y
33-
}
13+
/// <summary>
14+
/// The vertical analogue coordinate
15+
/// </summary>
16+
Y
3417
}
+19-36
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,27 @@
1-
#region Title Header
1+
namespace MupenSharp.Enums;
22

3-
// Name: Phillip Smith
4-
//
5-
// Solution: MupenTasStudio
6-
// Project: MupenSharp
7-
// File Name: Controller.cs
8-
//
9-
// Current Data:
10-
// 2021-07-14 12:06 PM
11-
//
12-
// Creation Date:
13-
// 2021-07-14 11:19 AM
14-
15-
#endregion
16-
17-
namespace MupenSharp.Enums
3+
/// <summary>
4+
/// Enum to indicate a specific controller selection.
5+
/// </summary>
6+
public enum Controller
187
{
198
/// <summary>
20-
/// Enum to indicate a specific controller selection.
9+
/// Controller in port one. Has offset 0.
2110
/// </summary>
22-
public enum Controller
23-
{
24-
/// <summary>
25-
/// Controller in port one. Has offset 0.
26-
/// </summary>
27-
ControllerOne = 0,
11+
ControllerOne = 0,
2812

29-
/// <summary>
30-
/// Controller in port two. Has offset 1.
31-
/// </summary>
32-
ControllerTwo = 1,
13+
/// <summary>
14+
/// Controller in port two. Has offset 1.
15+
/// </summary>
16+
ControllerTwo = 1,
3317

34-
/// <summary>
35-
/// Controller in port three. Has offset 2.
36-
/// </summary>
37-
ControllerThree = 2,
18+
/// <summary>
19+
/// Controller in port three. Has offset 2.
20+
/// </summary>
21+
ControllerThree = 2,
3822

39-
/// <summary>
40-
/// Controller in port four. Has offset 3.
41-
/// </summary>
42-
ControllerFour = 3
43-
}
23+
/// <summary>
24+
/// Controller in port four. Has offset 3.
25+
/// </summary>
26+
ControllerFour = 3
4427
}

0 commit comments

Comments
 (0)