Remove #regions in LuaInterface and Virtu projects
in LuaInterface there was a #region in a #region in a method body...
This commit is contained in:
parent
7725d59636
commit
dd93c232b9
|
@ -429,8 +429,6 @@ namespace Jellyfish.Virtu
|
|||
return CC;
|
||||
}
|
||||
|
||||
#region Core Operand Actions
|
||||
|
||||
private void GetAddressAbs() // abs
|
||||
{
|
||||
EA = _memory.Read(RPC) | (_memory.Read(RPC + 1) << 8);
|
||||
|
@ -622,9 +620,6 @@ namespace Jellyfish.Virtu
|
|||
_memory.WriteZeroPage(EA, data);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Core OpCode Actions
|
||||
private void ExecuteAdc65N02(int data, int cc)
|
||||
{
|
||||
if ((RP & Pd) == 0x0)
|
||||
|
@ -1333,9 +1328,7 @@ namespace Jellyfish.Virtu
|
|||
RP = RP & ~(Pn | Pz) | DataPnz[RA];
|
||||
CC += cc;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 6502 OpCode Actions
|
||||
private void Execute65X02And21() // and (zpg, x)
|
||||
{
|
||||
GetAddressZpgIndX();
|
||||
|
@ -2069,10 +2062,6 @@ namespace Jellyfish.Virtu
|
|||
ExecuteTya(2);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 65N02 OpCode Actions
|
||||
|
||||
private void Execute65N02Adc61() // adc (zpg, x)
|
||||
{
|
||||
GetAddressZpgIndX();
|
||||
|
@ -2733,9 +2722,6 @@ namespace Jellyfish.Virtu
|
|||
ExecuteSbc65N02(ReadAbsX(), 4);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 65C02 OpCode Actions
|
||||
private void Execute65C02Adc61() // adc (zpg, x)
|
||||
{
|
||||
GetAddressZpgIndX();
|
||||
|
@ -3419,8 +3405,6 @@ namespace Jellyfish.Virtu
|
|||
WriteAbs(ExecuteTsb(ReadAbs(), 6));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private bool Is65C02
|
||||
{
|
||||
get => _is65C02;
|
||||
|
|
|
@ -280,8 +280,6 @@ namespace Jellyfish.Virtu
|
|||
MapRegionD0FF();
|
||||
}
|
||||
|
||||
#region Core Read & Write
|
||||
|
||||
public int ReadOpcode(int address)
|
||||
{
|
||||
int region = PageRegion[address >> 8];
|
||||
|
@ -336,10 +334,6 @@ namespace Jellyfish.Virtu
|
|||
_zeroPage[address] = (byte)data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Read Actions
|
||||
|
||||
private int ReadIoRegionC0CF(int address)
|
||||
{
|
||||
switch (address & 0xFF00)
|
||||
|
@ -794,10 +788,6 @@ namespace Jellyfish.Virtu
|
|||
return _romRegionE0FF[address - 0xE000];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Write Actions
|
||||
|
||||
private void WriteIoRegionC0C0(int address, byte data)
|
||||
{
|
||||
switch (address)
|
||||
|
@ -1702,9 +1692,6 @@ namespace Jellyfish.Virtu
|
|||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Softswitch Actions
|
||||
private void MapRegion0001()
|
||||
{
|
||||
if (!IsZeroPageAux)
|
||||
|
@ -2070,8 +2057,6 @@ namespace Jellyfish.Virtu
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private static int SetBit7(int data, bool value)
|
||||
{
|
||||
return value ? data | 0x80 : data & 0x7F;
|
||||
|
|
|
@ -216,8 +216,6 @@ namespace Jellyfish.Virtu
|
|||
DirtyScreenText();
|
||||
}
|
||||
|
||||
#region Draw Methods
|
||||
|
||||
private void DrawText40(int data, int x, int y)
|
||||
{
|
||||
int color = IsMonochrome ? ColorMono00 : ColorWhite00;
|
||||
|
@ -737,9 +735,6 @@ namespace Jellyfish.Virtu
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Flush Methods
|
||||
private void FlushRowMode0(int y)
|
||||
{
|
||||
int address = (_memory.IsVideoPage2 ? 0x0800 : 0x0400) + AddressOffset[y];
|
||||
|
@ -951,7 +946,6 @@ namespace Jellyfish.Virtu
|
|||
FlushRowMode2(y); // text80
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void FlushRowEvent()
|
||||
{
|
||||
|
|
|
@ -420,7 +420,6 @@ namespace NLua
|
|||
}
|
||||
}
|
||||
|
||||
#region Globals auto-complete
|
||||
private readonly List<string> globals = new List<string>();
|
||||
private bool globalsSorted;
|
||||
|
||||
|
@ -460,7 +459,6 @@ namespace NLua
|
|||
// If the type is a class or an interface and recursion hasn't been running too long, list the members
|
||||
else if ((type.IsClass || type.IsInterface) && type != typeof(string) && recursionCounter < 2)
|
||||
{
|
||||
#region Methods
|
||||
foreach (MethodInfo method in type.GetMethods(BindingFlags.Public | BindingFlags.Instance))
|
||||
{
|
||||
if (
|
||||
|
@ -482,9 +480,7 @@ namespace NLua
|
|||
globals.Add(command);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
foreach (FieldInfo field in type.GetFields(BindingFlags.Public | BindingFlags.Instance))
|
||||
{
|
||||
if (
|
||||
|
@ -496,9 +492,7 @@ namespace NLua
|
|||
registerGlobal(path + "." + field.Name, field.FieldType, recursionCounter + 1);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance))
|
||||
{
|
||||
if (
|
||||
|
@ -512,7 +506,6 @@ namespace NLua
|
|||
registerGlobal(path + "." + property.Name, property.PropertyType, recursionCounter + 1);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
// Otherwise simply add the element to the list
|
||||
else globals.Add(path);
|
||||
|
@ -520,7 +513,6 @@ namespace NLua
|
|||
// List will need to be sorted on next access
|
||||
globalsSorted = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
@ -726,8 +718,6 @@ namespace NLua
|
|||
* or userdata
|
||||
*/
|
||||
|
||||
#region lua debug functions
|
||||
|
||||
/// <summary>
|
||||
/// lua hook calback delegate
|
||||
/// </summary>
|
||||
|
@ -960,8 +950,6 @@ namespace NLua
|
|||
translator.push(luaState, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
List<int> scheduledDisposes = new List<int>();
|
||||
|
||||
internal void ScheduleDispose(int reference)
|
||||
|
@ -1089,8 +1077,6 @@ namespace NLua
|
|||
translator.pushFunction(luaState,function);
|
||||
}
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
if (translator != null)
|
||||
|
@ -1103,8 +1089,6 @@ namespace NLua
|
|||
System.GC.Collect();
|
||||
System.GC.WaitForPendingFinalizers();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace NLua
|
|||
{
|
||||
public static class LuaRegistrationHelper
|
||||
{
|
||||
#region Tagged instance methods
|
||||
/// <summary>
|
||||
/// Registers all public instance methods in an object tagged with <see cref="LuaGlobalAttribute"/> as Lua global functions
|
||||
/// </summary>
|
||||
|
@ -14,10 +13,8 @@ namespace NLua
|
|||
/// <param name="o">The object to get the methods from</param>
|
||||
public static void TaggedInstanceMethods(Lua lua, object o)
|
||||
{
|
||||
#region Sanity checks
|
||||
if (lua == null) throw new ArgumentNullException("lua");
|
||||
if (o == null) throw new ArgumentNullException("o");
|
||||
#endregion
|
||||
|
||||
foreach (MethodInfo method in o.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public))
|
||||
{
|
||||
|
@ -30,9 +27,7 @@ namespace NLua
|
|||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Tagged static methods
|
||||
/// <summary>
|
||||
/// Registers all public static methods in a class tagged with <see cref="LuaGlobalAttribute"/> as Lua global functions
|
||||
/// </summary>
|
||||
|
@ -40,11 +35,9 @@ namespace NLua
|
|||
/// <param name="type">The class type to get the methods from</param>
|
||||
public static void TaggedStaticMethods(Lua lua, Type type)
|
||||
{
|
||||
#region Sanity checks
|
||||
if (lua == null) throw new ArgumentNullException("lua");
|
||||
if (type == null) throw new ArgumentNullException("type");
|
||||
if (!type.IsClass) throw new ArgumentException("The type must be a class!", "type");
|
||||
#endregion
|
||||
|
||||
foreach (MethodInfo method in type.GetMethods(BindingFlags.Static | BindingFlags.Public))
|
||||
{
|
||||
|
@ -57,9 +50,7 @@ namespace NLua
|
|||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Enumeration
|
||||
/// <summary>
|
||||
/// Registers an enumeration's values for usage as a Lua variable table
|
||||
/// </summary>
|
||||
|
@ -68,9 +59,7 @@ namespace NLua
|
|||
[SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The type parameter is used to select an enum type")]
|
||||
public static void Enumeration<T>(Lua lua)
|
||||
{
|
||||
#region Sanity checks
|
||||
if (lua == null) throw new ArgumentNullException("lua");
|
||||
#endregion
|
||||
|
||||
Type type = typeof(T);
|
||||
if (!type.IsEnum) throw new ArgumentException("The type must be an enumeration!");
|
||||
|
@ -85,6 +74,5 @@ namespace NLua
|
|||
lua[path] = values[i];
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue