Skip to content

Commit

Permalink
code cleanup & reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
TimeTravelPenguin committed Oct 23, 2024
1 parent a044091 commit e7db7e2
Show file tree
Hide file tree
Showing 17 changed files with 753 additions and 811 deletions.
38 changes: 19 additions & 19 deletions MupenSharp/MupenSharp/Attributes/StringEncodingAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
namespace MupenSharp.Attributes;

/// <summary>
/// Attribute used to specify a string encoding and byte size.
/// Attribute used to specify a string encoding and byte size.
/// </summary>
[UsedImplicitly]
[AttributeUsage(AttributeTargets.Property)]
public sealed class StringEncodingAttribute : Attribute
{
/// <summary>
/// Sets the string encoding type for reading and writing
/// </summary>
public Encoding Encoding { get; }
/// <summary>
/// Attribute used to specify a string encoding and byte size.
/// </summary>
/// <param name="encoding">The type of encoding of the string.</param>
/// <param name="byteSize">The number of bytes of the string.</param>
public StringEncodingAttribute(Encoding encoding, int byteSize)
{
Encoding = encoding;
ByteSize = byteSize;
}

/// <summary>
/// The size of the string in bytes
/// </summary>
public int ByteSize { get; }
/// <summary>
/// Sets the string encoding type for reading and writing
/// </summary>
public Encoding Encoding { get; }

/// <summary>
/// Attribute used to specify a string encoding and byte size.
/// </summary>
/// <param name="encoding">The type of encoding of the string.</param>
/// <param name="byteSize">The number of bytes of the string.</param>
public StringEncodingAttribute(Encoding encoding, int byteSize)
{
Encoding = encoding;
ByteSize = byteSize;
}
/// <summary>
/// The size of the string in bytes
/// </summary>
public int ByteSize { get; }
}
18 changes: 9 additions & 9 deletions MupenSharp/MupenSharp/Enums/AnalogueInput.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace MupenSharp.Enums;

/// <summary>
/// Enum for Analogue Inputs
/// Enum for Analogue Inputs
/// </summary>
public enum AnalogueInput
{
/// <summary>
/// The horizontal analogue coordinate
/// </summary>
X,
/// <summary>
/// The horizontal analogue coordinate
/// </summary>
X,

/// <summary>
/// The vertical analogue coordinate
/// </summary>
Y
/// <summary>
/// The vertical analogue coordinate
/// </summary>
Y
}
34 changes: 17 additions & 17 deletions MupenSharp/MupenSharp/Enums/Controller.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
namespace MupenSharp.Enums;

/// <summary>
/// Enum to indicate a specific controller selection.
/// Enum to indicate a specific controller selection.
/// </summary>
public enum Controller
{
/// <summary>
/// Controller in port one. Has offset 0.
/// </summary>
ControllerOne = 0,
/// <summary>
/// Controller in port one. Has offset 0.
/// </summary>
ControllerOne = 0,

/// <summary>
/// Controller in port two. Has offset 1.
/// </summary>
ControllerTwo = 1,
/// <summary>
/// Controller in port two. Has offset 1.
/// </summary>
ControllerTwo = 1,

/// <summary>
/// Controller in port three. Has offset 2.
/// </summary>
ControllerThree = 2,
/// <summary>
/// Controller in port three. Has offset 2.
/// </summary>
ControllerThree = 2,

/// <summary>
/// Controller in port four. Has offset 3.
/// </summary>
ControllerFour = 3
/// <summary>
/// Controller in port four. Has offset 3.
/// </summary>
ControllerFour = 3
}
160 changes: 80 additions & 80 deletions MupenSharp/MupenSharp/Enums/ControllerInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,88 +3,88 @@
namespace MupenSharp.Enums;

/// <summary>
/// Controller button bit flags
/// Controller button bit flags
/// </summary>
[Flags]
public enum ControllerInput
{
/// <summary>
/// The C-Right button
/// </summary>
CRight = 0x0001,

/// <summary>
/// The C-Left button
/// </summary>
CLeft = 0x0002,

/// <summary>
/// The C-Down button
/// </summary>
CDown = 0x0004,

/// <summary>
/// The C-Up button
/// </summary>
CUp = 0x0008,

/// <summary>
/// The right shoulder button
/// </summary>
R = 0x0010,

/// <summary>
/// The left shoulder button
/// </summary>
L = 0x0020,

/// <summary>
/// Reserved input 01
/// </summary>
Reserved1 = 0x0040,

/// <summary>
/// Reserved input 02
/// </summary>
Reserved2 = 0x0080,

/// <summary>
/// Right D-Pad button
/// </summary>
DigitalPadRight = 0x0100,

/// <summary>
/// Left D-Pad button
/// </summary>
DigitalPadLeft = 0x0200,

/// <summary>
/// Down D-Pad button
/// </summary>
DigitalPadDown = 0x0400,

/// <summary>
/// Up D-Pad button
/// </summary>
DigitalPadUp = 0x0800,

/// <summary>
/// The Start button
/// </summary>
Start = 0x1000,

/// <summary>
/// The Z button
/// </summary>
Z = 0x2000,

/// <summary>
/// The B button
/// </summary>
B = 0x4000,

/// <summary>
/// The A button
/// </summary>
A = 0x8000
/// <summary>
/// The C-Right button
/// </summary>
CRight = 0x0001,

/// <summary>
/// The C-Left button
/// </summary>
CLeft = 0x0002,

/// <summary>
/// The C-Down button
/// </summary>
CDown = 0x0004,

/// <summary>
/// The C-Up button
/// </summary>
CUp = 0x0008,

/// <summary>
/// The right shoulder button
/// </summary>
R = 0x0010,

/// <summary>
/// The left shoulder button
/// </summary>
L = 0x0020,

/// <summary>
/// Reserved input 01
/// </summary>
Reserved1 = 0x0040,

/// <summary>
/// Reserved input 02
/// </summary>
Reserved2 = 0x0080,

/// <summary>
/// Right D-Pad button
/// </summary>
DigitalPadRight = 0x0100,

/// <summary>
/// Left D-Pad button
/// </summary>
DigitalPadLeft = 0x0200,

/// <summary>
/// Down D-Pad button
/// </summary>
DigitalPadDown = 0x0400,

/// <summary>
/// Up D-Pad button
/// </summary>
DigitalPadUp = 0x0800,

/// <summary>
/// The Start button
/// </summary>
Start = 0x1000,

/// <summary>
/// The Z button
/// </summary>
Z = 0x2000,

/// <summary>
/// The B button
/// </summary>
B = 0x4000,

/// <summary>
/// The A button
/// </summary>
A = 0x8000
}
Loading

0 comments on commit e7db7e2

Please sign in to comment.