properly delete working types

This commit is contained in:
adelikat 2020-02-02 10:09:29 -06:00
parent 65249954b9
commit d2c191b394
4 changed files with 0 additions and 454 deletions

View File

@ -1,116 +0,0 @@
using System;
using System.Globalization;
using System.Security;
namespace BizHawk.Emulation.Common.WorkingTypes
{
//
// Summary:
// Represents an 8-bit unsigned integer, that is capable of arithmetic without making you weep.
// Also provides all the base functionality of the standard C# Byte by calling its methods where relevant.
public unsafe class wbyte : IComparable, IFormattable, IComparable<wbyte>, IEquatable<wbyte>
{
private Byte val;
public const Byte MaxValue = Byte.MaxValue;
public const Byte MinValue = Byte.MinValue;
public static implicit operator wbyte(ulong value)
{
return new wbyte(value);
}
public static implicit operator wbyte(wushort value)
{
return new wbyte(value);
}
public static implicit operator byte(wbyte value)
{
return value.val;
}
public wbyte()
{
}
public wbyte(ulong value)
{
val = (Byte)(value & 0xFF);
}
public wbyte(long value)
{
val = (Byte)(value & 0xFF);
}
public wbyte(double value)
{
val = (Byte)(((long)value) & 0xFF);
}
public static wbyte Parse(string s, NumberStyles style, IFormatProvider provider)
{
return (ulong)Byte.Parse(s, style, provider);
}
public static wbyte Parse(string s, IFormatProvider provider)
{
return (ulong)Byte.Parse(s, provider);
}
public static wbyte Parse(string s)
{
return (ulong)Byte.Parse(s);
}
public static wbyte Parse(string s, NumberStyles style)
{
return (ulong)Byte.Parse(s, style);
}
public static bool TryParse(string s, out wbyte result)
{
result = new wbyte();
return byte.TryParse(s, out result.val);
}
public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out wbyte result)
{
result = new wbyte();
return byte.TryParse(s, style, provider, out result.val);
}
public int CompareTo(wbyte value)
{
return val.CompareTo(value.val);
}
public int CompareTo(object value)
{
return val.CompareTo(value);
}
public override bool Equals(object obj)
{
return val.Equals(obj);
}
public bool Equals(wbyte obj)
{
return val.Equals(obj);
}
public override int GetHashCode()
{
return val.GetHashCode();
}
public TypeCode GetTypeCode()
{
return val.GetTypeCode();
}
[SecuritySafeCritical]
public string ToString(string format, IFormatProvider provider)
{
return val.ToString(format, provider);
}
[SecuritySafeCritical]
public override string ToString()
{
return val.ToString();
}
[SecuritySafeCritical]
public string ToString(string format)
{
return val.ToString(format);
}
[SecuritySafeCritical]
public string ToString(IFormatProvider provider)
{
return val.ToString(provider);
}
}
}

View File

@ -1,111 +0,0 @@
using System;
using System.Globalization;
using System.Security;
namespace BizHawk.Emulation.Common.WorkingTypes
{
//
// Summary:
// Represents an 8-bit unsigned integer, that is capable of arithmetic without making you weep.
// Also provides all the base functionality of the standard C# SByte by calling its methods where relevant.
public unsafe class wsbyte : IComparable, IFormattable, IComparable<wsbyte>, IEquatable<wsbyte>
{
private SByte val;
public const SByte MaxValue = SByte.MaxValue;
public const SByte MinValue = SByte.MinValue;
public static implicit operator wsbyte(long value)
{
return new wsbyte(value);
}
public static implicit operator SByte(wsbyte value)
{
return value.val;
}
public wsbyte()
{
}
public wsbyte(long value)
{
val = (SByte)(value & 0xFF);
}
public wsbyte(ulong value)
{
val = (SByte)(value & 0xFF);
}
public wsbyte(double value)
{
val = (SByte)(((ulong)value) & 0xFF);
}
public static wsbyte Parse(string s, NumberStyles style, IFormatProvider provider)
{
return (long)SByte.Parse(s, style, provider);
}
public static wsbyte Parse(string s, IFormatProvider provider)
{
return (long)SByte.Parse(s, provider);
}
public static wsbyte Parse(string s)
{
return (long)SByte.Parse(s);
}
public static wsbyte Parse(string s, NumberStyles style)
{
return (long)SByte.Parse(s, style);
}
public static bool TryParse(string s, out wsbyte result)
{
result = new wsbyte();
return SByte.TryParse(s, out result.val);
}
public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out wsbyte result)
{
result = new wsbyte();
return SByte.TryParse(s, style, provider, out result.val);
}
public int CompareTo(wsbyte value)
{
return val.CompareTo(value.val);
}
public int CompareTo(object value)
{
return val.CompareTo(value);
}
public override bool Equals(object obj)
{
return val.Equals(obj);
}
public bool Equals(wsbyte obj)
{
return val.Equals(obj);
}
public override int GetHashCode()
{
return val.GetHashCode();
}
public TypeCode GetTypeCode()
{
return val.GetTypeCode();
}
[SecuritySafeCritical]
public string ToString(string format, IFormatProvider provider)
{
return val.ToString(format, provider);
}
[SecuritySafeCritical]
public override string ToString()
{
return val.ToString();
}
[SecuritySafeCritical]
public string ToString(string format)
{
return val.ToString(format);
}
[SecuritySafeCritical]
public string ToString(IFormatProvider provider)
{
return val.ToString(provider);
}
}
}

View File

@ -1,111 +0,0 @@
using System;
using System.Globalization;
using System.Security;
namespace BizHawk.Emulation.Common.WorkingTypes
{
//
// Summary:
// Represents an 16-bit unsigned integer, that is capable of arithmetic without making you weep.
// Also provides all the base functionality of the standard C# Int16 by calling its methods where relevant.
public unsafe class wshort : IComparable, IFormattable, IComparable<wshort>, IEquatable<wshort>
{
private Int16 val;
public const Int16 MaxValue = Int16.MaxValue;
public const Int16 MinValue = Int16.MinValue;
public static implicit operator wshort(long value)
{
return new wshort(value);
}
public static implicit operator Int16(wshort value)
{
return value.val;
}
public wshort()
{
}
public wshort(long value)
{
val = (Int16)(value & 0xFFFF);
}
public wshort(ulong value)
{
val = (Int16)(value & 0xFFFF);
}
public wshort(double value)
{
val = (Int16)(((ulong)value) & 0xFFFF);
}
public static wshort Parse(string s, NumberStyles style, IFormatProvider provider)
{
return (long)Int16.Parse(s, style, provider);
}
public static wshort Parse(string s, IFormatProvider provider)
{
return (long)Int16.Parse(s, provider);
}
public static wshort Parse(string s)
{
return (long)Int16.Parse(s);
}
public static wshort Parse(string s, NumberStyles style)
{
return (long)Int16.Parse(s, style);
}
public static bool TryParse(string s, out wshort result)
{
result = new wshort();
return Int16.TryParse(s, out result.val);
}
public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out wshort result)
{
result = new wshort();
return Int16.TryParse(s, style, provider, out result.val);
}
public int CompareTo(wshort value)
{
return val.CompareTo(value.val);
}
public int CompareTo(object value)
{
return val.CompareTo(value);
}
public override bool Equals(object obj)
{
return val.Equals(obj);
}
public bool Equals(wshort obj)
{
return val.Equals(obj);
}
public override int GetHashCode()
{
return val.GetHashCode();
}
public TypeCode GetTypeCode()
{
return val.GetTypeCode();
}
[SecuritySafeCritical]
public string ToString(string format, IFormatProvider provider)
{
return val.ToString(format, provider);
}
[SecuritySafeCritical]
public override string ToString()
{
return val.ToString();
}
[SecuritySafeCritical]
public string ToString(string format)
{
return val.ToString(format);
}
[SecuritySafeCritical]
public string ToString(IFormatProvider provider)
{
return val.ToString(provider);
}
}
}

View File

@ -1,116 +0,0 @@
using System;
using System.Globalization;
using System.Security;
namespace BizHawk.Emulation.Common.WorkingTypes
{
//
// Summary:
// Represents an 16-bit unsigned integer, that is capable of arithmetic without making you weep.
// Also provides all the base functionality of the standard C# UInt16 by calling its methods where relevant.
public unsafe class wushort : IComparable, IFormattable, IComparable<wushort>, IEquatable<wushort>
{
private UInt16 val;
public const UInt16 MaxValue = UInt16.MaxValue;
public const UInt16 MinValue = UInt16.MinValue;
public static implicit operator wushort(ulong value)
{
return new wushort(value);
}
public static implicit operator wushort(wbyte value)
{
return new wushort(value);
}
public static implicit operator UInt16(wushort value)
{
return value.val;
}
public wushort()
{
}
public wushort(ulong value)
{
val = (UInt16)(value & 0xFFFF);
}
public wushort(long value)
{
val = (UInt16)(value & 0xFFFF);
}
public wushort(double value)
{
val = (UInt16)(((long)value) & 0xFFFF);
}
public static wushort Parse(string s, NumberStyles style, IFormatProvider provider)
{
return (uint)UInt16.Parse(s, style, provider);
}
public static wushort Parse(string s, IFormatProvider provider)
{
return (uint)UInt16.Parse(s, provider);
}
public static wushort Parse(string s)
{
return (uint)UInt16.Parse(s);
}
public static wushort Parse(string s, NumberStyles style)
{
return (uint)UInt16.Parse(s, style);
}
public static bool TryParse(string s, out wushort result)
{
result = new wushort();
return ushort.TryParse(s, out result.val);
}
public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out wushort result)
{
result = new wushort();
return ushort.TryParse(s, style, provider, out result.val);
}
public int CompareTo(wushort value)
{
return val.CompareTo(value.val);
}
public int CompareTo(object value)
{
return val.CompareTo(value);
}
public override bool Equals(object obj)
{
return val.Equals(obj);
}
public bool Equals(wushort obj)
{
return val.Equals(obj);
}
public override int GetHashCode()
{
return val.GetHashCode();
}
public TypeCode GetTypeCode()
{
return val.GetTypeCode();
}
[SecuritySafeCritical]
public string ToString(string format, IFormatProvider provider)
{
return val.ToString(format, provider);
}
[SecuritySafeCritical]
public override string ToString()
{
return val.ToString();
}
[SecuritySafeCritical]
public string ToString(string format)
{
return val.ToString(format);
}
[SecuritySafeCritical]
public string ToString(IFormatProvider provider)
{
return val.ToString(provider);
}
}
}