From b1e02fbdce4938b8ff7a05972a2f6a78ee65a4fe Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 25 Jan 2020 15:16:12 +1000 Subject: [PATCH] Enable SA1106 and fix noncompliance "Code should not contain empty statements" i.e. don't put a semicolon there --- BizHawk.Client.Common/miniz/LibMiniz.cs | 4 +-- BizHawk.Client.DiscoHawk/DiscoHawk.cs | 6 ++-- BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs | 2 +- BizHawk.Client.EmuHawk/ArchiveChooser.cs | 6 ++-- BizHawk.Client.EmuHawk/MainForm.Events.cs | 2 +- .../Lua/Libraries/EmuLuaLibrary.Tastudio.cs | 6 ++-- .../Arcades/MAME/LibMAME.cs | 2 +- .../CPUs/Intel8048/I8048.cs | 2 +- .../CPUs/LR35902/LR35902.cs | 2 +- BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs | 2 +- BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs | 4 +-- .../CPUs/W65816/Disassembler.cs | 2 +- BizHawk.Emulation.Cores/CPUs/x86/x86.cs | 4 +-- .../GCE/Vectrex/VectrexHawk.ICodeDataLog.cs | 2 +- .../Magnavox/Odyssey2/O2Hawk.IDebuggable.cs | 4 +-- .../Consoles/Nintendo/Gameboy/GBColors.cs | 2 +- .../Consoles/Nintendo/Gameboy/LibGambatte.cs | 2 +- .../N64/NativeApi/mupen64plusCoreApi.cs | 18 ++++++------ .../Consoles/Nintendo/NES/Boards/SEEPROM.cs | 2 +- .../Consoles/Nintendo/NES/FDS/RamAdapter.cs | 2 +- .../Consoles/Nintendo/NES/NES.BoardSystem.cs | 2 +- .../Nintendo/NES/NES.ICodeDataLogger.cs | 2 +- .../Consoles/Nintendo/NES/NES.ISettable.cs | 2 +- .../Consoles/Nintendo/NES/PPU.cs | 2 +- .../Consoles/Nintendo/NES/PPU.regs.cs | 2 +- .../Consoles/Nintendo/NES/PPU.run.cs | 2 +- .../Consoles/Nintendo/SNES/LibsnesApi.cs | 4 +-- .../Nintendo/SNES/LibsnesApi_Enums.cs | 4 +-- .../Consoles/Nintendo/SNES/SnesColors.cs | 2 +- .../GGHawkLink/GGHawkLink.ICodeDataLog.cs | 2 +- .../Consoles/Sega/SMS/SMS.ICodeDataLogger.cs | 2 +- .../Consoles/Sega/SMS/SMS.cs | 2 +- .../Consoles/Sega/SMS/TerebiOekaki.cs | 2 +- .../Consoles/Sega/SMS/VDP.cs | 2 +- .../Consoles/Sega/gpgx64/GPGX.cs | 2 +- .../Consoles/Sega/gpgx64/LibGPGX.cs | 10 +++---- .../Consoles/Sony/PSX/OctoshockDll.cs | 26 ++++++++--------- .../Consoles/WonderSwan/BizSwan.cs | 2 +- .../Libretro/LibretroApi_Enums.cs | 28 +++++++++---------- .../Libretro/LibretroApi_Structs.cs | 2 +- BizHawk.Emulation.Cores/Sound/YM2413.cs | 4 +-- BizHawk.Emulation.DiscSystem/API_MednaDisc.cs | 4 +-- BizHawk.Emulation.DiscSystem/DiscJob.cs | 2 +- Bizware/BizHawk.Bizware.BizwareGL/TexAtlas.cs | 4 +-- Common.ruleset | 3 -- 45 files changed, 96 insertions(+), 99 deletions(-) diff --git a/BizHawk.Client.Common/miniz/LibMiniz.cs b/BizHawk.Client.Common/miniz/LibMiniz.cs index 32a914b0b5..106d3a5444 100644 --- a/BizHawk.Client.Common/miniz/LibMiniz.cs +++ b/BizHawk.Client.Common/miniz/LibMiniz.cs @@ -18,7 +18,7 @@ namespace BizHawk.Client.Common.Miniz MZ_ZIP_FLAG_IGNORE_PATH = 0x0200, MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400, MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800 - }; + } enum mz_compression_level : uint { @@ -28,7 +28,7 @@ namespace BizHawk.Client.Common.Miniz MZ_UBER_COMPRESSION = 10, MZ_DEFAULT_LEVEL = 6, MZ_DEFAULT_COMPRESSION = unchecked((uint)-1) - }; + } [DllImport(DllName, CallingConvention = CC)] public static extern bool mz_zip_writer_init_file(IntPtr pZip, string pFilename, long size_to_reserve_at_beginning); diff --git a/BizHawk.Client.DiscoHawk/DiscoHawk.cs b/BizHawk.Client.DiscoHawk/DiscoHawk.cs index 1dc43eb927..88bbf80603 100644 --- a/BizHawk.Client.DiscoHawk/DiscoHawk.cs +++ b/BizHawk.Client.DiscoHawk/DiscoHawk.cs @@ -146,16 +146,16 @@ namespace BizHawk.Client.DiscoHawk public enum ChangeWindowMessageFilterFlags : uint { Add = 1, Remove = 2 - }; + } public enum MessageFilterInfo : uint { None = 0, AlreadyAllowed = 1, AlreadyDisAllowed = 2, AllowedHigher = 3 - }; + } public enum ChangeWindowMessageFilterExAction : uint { Reset = 0, Allow = 1, DisAllow = 2 - }; + } [StructLayout(LayoutKind.Sequential)] public struct CHANGEFILTERSTRUCT diff --git a/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs b/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs index 403360e87c..16f8fc37da 100644 --- a/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs +++ b/BizHawk.Client.EmuHawk/AVOut/NutMuxer.cs @@ -225,7 +225,7 @@ namespace BizHawk.Client.EmuHawk Syncpoint = 0x4e4be4adeeca4569, Index = 0x4e58dd672f23e64e, Info = 0x4e49ab68b596ba78 - }; + } private MemoryStream _data; private readonly StartCode _startCode; diff --git a/BizHawk.Client.EmuHawk/ArchiveChooser.cs b/BizHawk.Client.EmuHawk/ArchiveChooser.cs index cdc578306a..331d0e6d17 100644 --- a/BizHawk.Client.EmuHawk/ArchiveChooser.cs +++ b/BizHawk.Client.EmuHawk/ArchiveChooser.cs @@ -199,7 +199,7 @@ namespace BizHawk.Client.EmuHawk private interface IMatcher { bool Matches(ListViewItem value); - }; + } private class SimpleMatcher : IMatcher { @@ -217,7 +217,7 @@ namespace BizHawk.Client.EmuHawk return true; } - }; + } private class RegExMatcher : IMatcher { @@ -226,7 +226,7 @@ namespace BizHawk.Client.EmuHawk { return Matcher.IsMatch(value.Text); } - }; + } private IMatcher CreateMatcher(string searchKey) { diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index 9a4e21eb7e..3728003d45 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -686,7 +686,7 @@ namespace BizHawk.Client.EmuHawk && MovieSession.Movie.Mode != MovieMode.Play; HardResetMenuItem.Enabled = Emulator.ControllerDefinition.BoolButtons.Contains("Power") - && MovieSession.Movie.Mode != MovieMode.Play;; + && MovieSession.Movie.Mode != MovieMode.Play; PauseMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Pause"].Bindings; RebootCoreMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Reboot Core"].Bindings; diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs index dd3d97ea8d..4d015ed8b0 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Tastudio.cs @@ -35,20 +35,20 @@ namespace BizHawk.Client.EmuHawk public string Button; public bool ValueBool; public float ValueFloat; - }; + } public enum LuaChangeTypes { InputChange, InsertFrames, DeleteFrames, - }; + } private enum InputChangeTypes { Bool, Float, - }; + } public class TastudioBranchInfo { diff --git a/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs b/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs index e10e06cfca..d05c9ae9f4 100644 --- a/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs +++ b/BizHawk.Emulation.Cores/Arcades/MAME/LibMAME.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME public enum OutputChannel { ERROR, WARNING, INFO, DEBUG, VERBOSE, LOG, COUNT - }; + } // main launcher [DllImport(dll, CallingConvention = cc)] diff --git a/BizHawk.Emulation.Cores/CPUs/Intel8048/I8048.cs b/BizHawk.Emulation.Cores/CPUs/Intel8048/I8048.cs index a1e00fca68..244431faf3 100644 --- a/BizHawk.Emulation.Cores/CPUs/Intel8048/I8048.cs +++ b/BizHawk.Emulation.Cores/CPUs/Intel8048/I8048.cs @@ -147,7 +147,7 @@ namespace BizHawk.Emulation.Cores.Components.I8048 FetchOperand = 2, Data = 4, Write = 8 - }; + } // Execute instructions public void ExecuteOne() diff --git a/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs b/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs index 266ab7ec22..f004385440 100644 --- a/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs +++ b/BizHawk.Emulation.Cores/CPUs/LR35902/LR35902.cs @@ -120,7 +120,7 @@ namespace BizHawk.Emulation.Cores.Components.LR35902 FetchOperand = 2, Data = 4, Write = 8 - }; + } // Execute instructions public void ExecuteOne(ref byte interrupt_src, byte interrupt_enable) diff --git a/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs b/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs index 691200cc65..f30c0312c6 100644 --- a/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs +++ b/BizHawk.Emulation.Cores/CPUs/MC6800/MC6800.cs @@ -140,7 +140,7 @@ namespace BizHawk.Emulation.Cores.Components.MC6800 FetchOperand = 2, Data = 4, Write = 8 - }; + } // Execute instructions public void ExecuteOne() diff --git a/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs b/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs index 2f59c7339d..325a3479f2 100644 --- a/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs +++ b/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs @@ -149,7 +149,7 @@ namespace BizHawk.Emulation.Cores.Components.MC6809 FetchOperand = 2, Data = 4, Write = 8 - }; + } // Execute instructions public void ExecuteOne() @@ -234,7 +234,7 @@ namespace BizHawk.Emulation.Cores.Components.MC6809 Regs[reg_d_ad] = (ushort)((Regs[reg_h_ad] << 8) | Regs[reg_l_ad]); break; case JPE: - if (!FlagE) { instr_pntr = 44; irq_pntr = 10; }; + if (!FlagE) { instr_pntr = 44; irq_pntr = 10; } break; case IDX_DCDE: Index_decode(); diff --git a/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs b/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs index ae10bc029c..e2f9e2e905 100644 --- a/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs +++ b/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs @@ -249,7 +249,7 @@ namespace BizHawk.Emulation.Cores.Components.W65816 default: length = 1; return "???"; - }; + } // Parse out parameter list switch (opcode) diff --git a/BizHawk.Emulation.Cores/CPUs/x86/x86.cs b/BizHawk.Emulation.Cores/CPUs/x86/x86.cs index 43bfede8ee..7388b8b2d0 100644 --- a/BizHawk.Emulation.Cores/CPUs/x86/x86.cs +++ b/BizHawk.Emulation.Cores/CPUs/x86/x86.cs @@ -3,8 +3,8 @@ using System.Runtime.InteropServices; namespace BizHawk.Emulation.Cores.Components.x86 { - public interface x86CpuType { }; - public struct Intel8086 : x86CpuType { }; + public interface x86CpuType { } + public struct Intel8086 : x86CpuType { } public sealed partial class x86 where CpuType : struct, x86CpuType { diff --git a/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ICodeDataLog.cs b/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ICodeDataLog.cs index 0c4c2d0421..f3f9e4d8b3 100644 --- a/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ICodeDataLog.cs +++ b/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ICodeDataLog.cs @@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex ExecFirst = 0x01, ExecOperand = 0x02, Data = 0x04 - }; + } private struct CDLog_MapResults { diff --git a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs index 272033d934..c3767aa2b1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IDebuggable.cs @@ -45,7 +45,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk break; case "R2": cpu.Regs[2 + cpu.RB] = (byte)value; - break; ; + break; case "R3": cpu.Regs[3 + cpu.RB] = (byte)value; break; @@ -57,7 +57,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk break; case "R6": cpu.Regs[6 + cpu.RB] = (byte)value; - break; ; + break; case "R7": cpu.Regs[7 + cpu.RB] = (byte)value; break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBColors.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBColors.cs index 7e20de9573..c44dab34c2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBColors.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBColors.cs @@ -125,7 +125,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy vbagbnew, vbabgbold, gba - }; + } public static int[] GetLut(ColorType c) { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs index ede91383bf..27f7cd990a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs @@ -116,7 +116,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy BG_PALETTE = 0, SP1_PALETTE = 1, SP2_PALETTE = 2 - }; + } /// opaque state pointer /// in [0, 2]: One of BG_PALETTE, SP1_PALETTE and SP2_PALETTE. diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs index a8c522f19f..609c5a399c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs @@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64ERR_SYSTEM_FAIL, /* A system function call, such as an SDL or file operation, failed */ M64ERR_UNSUPPORTED, /* Function call is not supported (ie, core not built with debugger) */ M64ERR_WRONG_TYPE /* A given input type parameter cannot be used for desired operation */ - }; + } public enum m64p_plugin_type { @@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64PLUGIN_AUDIO, M64PLUGIN_INPUT, M64PLUGIN_CORE - }; + } private enum m64p_command { @@ -83,7 +83,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64CMD_ADVANCE_FRAME, M64CMD_SET_VI_CALLBACK, M64CMD_SET_RENDER_CALLBACK - }; + } private enum m64p_dbg_bkp_command { @@ -96,7 +96,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64P_BKP_CMD_ENABLE, M64P_BKP_CMD_DISABLE, M64P_BKP_CMD_CHECK - }; + } [Flags] private enum m64p_dbg_bkp_flags @@ -108,7 +108,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64P_BPT_FLAG_WRITE = 0x10, M64P_BPT_FLAG_EXEC = 0x20, M64P_BPT_FLAG_LOG = 0x40 - }; + } private enum m64p_dbg_state { @@ -117,21 +117,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64P_DBG_NUM_BREAKPOINTS, M64P_DBG_CPU_DYNACORE, M64P_DBG_CPU_NEXT_INTERRUPT - }; + } private enum m64p_dbg_runstate { M64P_DBG_RUNSTATE_PAUSED = 0, M64P_DBG_RUNSTATE_STEPPING, M64P_DBG_RUNSTATE_RUNNING - }; + } public enum m64p_emu_state { M64EMU_STOPPED = 1, M64EMU_RUNNING, M64EMU_PAUSED - }; + } public enum m64p_type { @@ -139,7 +139,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi M64TYPE_FLOAT, M64TYPE_BOOL, M64TYPE_STRING - }; + } public enum N64_MEMORY : uint { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs index 7d52d63589..9f72a11ecb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SEEPROM.cs @@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES enum EState { Off, Select, Ignore, Address, Read, Write - }; + } EState State; /// diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs index 6686e53409..ea85f1ce55 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/RamAdapter.cs @@ -304,7 +304,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES RESET, /// nothing happening IDLE, - }; + } /// /// set cycleswaiting param after a state change diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs index 55b4bc75ad..738debdcc1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs @@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES void ApplyCustomAudio(short[] samples); Dictionary InitialRegisterValues { get; set; } - }; + } [INESBoardImpl] public abstract class NESBoardBase : INESBoard diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ICodeDataLogger.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ICodeDataLogger.cs index 07ab8aa44b..db3c3d445e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ICodeDataLogger.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ICodeDataLogger.cs @@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES ExecFirst = 0x01, ExecOperand = 0x02, Data = 0x04 - }; + } private struct CDLog_MapResults { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs index 40a8878a69..157d544f0a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs @@ -64,7 +64,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES NTSC, PAL, Dendy - }; + } public Region RegionOverride = Region.Default; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs index 4aba6015e8..13b52296db 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES int preNMIlines; int postNMIlines; bool chopdot; - public enum Region { NTSC, PAL, Dendy, RGB }; + public enum Region { NTSC, PAL, Dendy, RGB } Region _region; public Region region { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs index fc0d744d7f..9393b47a53 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs @@ -256,7 +256,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES v &= 1; fv &= 7; } - }; + } public sealed class Reg_2000 { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs index 14a3bc717b..1699e5fa72 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.run.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public byte nt, at; public byte pt_0, pt_1; - }; + } BGDataRecord[] bgdata = new BGDataRecord[34]; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs index 6513a7fec9..96783d8f55 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -159,7 +159,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES CARTROM, CARTRAM, WRAM, APURAM, SGB_CARTROM, SGB_CARTRAM, SGB_WRAM, SGB_HRAM, NUM - }; + } public enum eTRACE : uint { @@ -175,7 +175,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES CPUData = 0x04, DMAData = 0x08, //not supported yet BRR = 0x80, - }; + } snes_video_refresh_t video_refresh; snes_input_poll_t input_poll; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs index f05d542f0d..e54d51f0c6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi_Enums.cs @@ -70,14 +70,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES eMessage_BRK_hook_read_smp, eMessage_BRK_hook_write_smp, eMessage_BRK_scanlineStart, - }; + } enum eStatus : int { eStatus_Idle, eStatus_CMD, eStatus_BRK - }; + } public enum SNES_INPUT_PORT : int { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs index 3fdf6c2fbf..6199e445ac 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/SnesColors.cs @@ -79,7 +79,7 @@ BizHawk, BSNES, Snes9x - }; + } //I separated these out to try and make them lazy construct, but it didnt work. try it some other way later. diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ICodeDataLog.cs b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ICodeDataLog.cs index 9e179fe513..d33fa8d7aa 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ICodeDataLog.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ICodeDataLog.cs @@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink ExecFirst = 0x01, ExecOperand = 0x02, Data = 0x04 - }; + } private ICodeDataLog CDL; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs index 14c9616b4c..c8cdbdbd6e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ICodeDataLogger.cs @@ -63,7 +63,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem ExecFirst = 0x01, ExecOperand = 0x02, Data = 0x04 - }; + } public struct CDLog_MapResults { diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index f060bed8a0..50f189af38 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -395,7 +395,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem case 0x01: Port01 = value; break; case 0x02: Port02 = value; break; case 0x03: p3_write = true; Port03 = value; break; - case 0x04: /*Port04 = value*/; break; // receive port, not sure what writing does + case 0x04: /*Port04 = value;*/ break; // receive port, not sure what writing does case 0x05: Port05 = (byte)(value & 0xF8); break; case 0x06: PSG.Set_Panning(value); break; case 0x3E: Port3E = value; break; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/TerebiOekaki.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/TerebiOekaki.cs index 30869f9042..1f63655eec 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/TerebiOekaki.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/TerebiOekaki.cs @@ -7,7 +7,7 @@ byte xCoord = 128; byte yCoord = 100; - enum Axis { XAxis, YAxis }; + enum Axis { XAxis, YAxis } Axis axis = Axis.XAxis; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs index f528652581..41ebaec371 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/VDP.cs @@ -357,7 +357,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem { HIntPending = true; if (EnableLineInterrupts) - {; + { Cpu.FlagI = true; } lineIntLinesRemaining = Registers[0x0A]; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs index 9d2e66aa08..15ea3da9eb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.cs @@ -185,7 +185,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx Teamplayer, Wayplay, Mouse - }; + } /// diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs index c9221ce262..a05c0e2301 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/LibGPGX.cs @@ -97,7 +97,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx SYSTEM_SPORTSPAD = 10, // Sega Sports Pad -- Master System SYSTEM_TEAMPLAYER = 11, // Multi Tap -- Sega TeamPlayer SYSTEM_WAYPLAY = 12, // Multi Tap -- EA 4-Way Play -- use both ports - }; + } public enum INPUT_DEVICE : byte { @@ -113,13 +113,13 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx DEVICE_TEREBI = 0x08, // Terebi Oekaki tablet DEVICE_XE_A1P = 0x09, // XE-A1P analog controller DEVICE_ACTIVATOR = 0x0a,// Activator - }; + } public enum CDLog_AddrType { MDCART, RAM68k, RAMZ80, SRAM, - }; + } [Flags] public enum CDLog_Flags @@ -130,7 +130,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx ExecZ80Operand = 0x10, DataZ80 = 0x20, DMASource = 0x40, - }; + } [UnmanagedFunctionPointer(CallingConvention.Cdecl)] @@ -216,7 +216,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx /* Menacer */ INPUT_MENACER_TRIGGER = 0x0040, INPUT_MENACER_START = 0x0080, - }; + } [StructLayout(LayoutKind.Sequential)] public class InputData diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs index ed06a916f6..51bae8ff2d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/OctoshockDll.cs @@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public enum eShockStep { Frame - }; + } public enum eShockFramebufferFlags { @@ -45,7 +45,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX GPURAM = 3, //512K SPURAM = 4, //512K DCache = 5 //1K - }; + } public enum eShockStateTransaction : int { @@ -63,7 +63,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX Write = 2, //writes from the frontend to the memcard Read = 3, //reads from the memcard to the frontend. Also clears the dirty flag CheckDirty = 4, //checks whether the memcard is dirty - }; + } public enum ePeripheralType : int @@ -77,7 +77,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX NegCon = 4, Multitap = 10, - }; + } /// /// this is implemented as an overall render type instead of a horizontal clip control @@ -89,7 +89,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX Normal, ClipOverscan, Framebuffer - }; + } public enum eShockDeinterlaceMode : int { @@ -120,7 +120,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX { public eRegion region; public unsafe fixed sbyte id[5]; //SCEI, SCEA, SCEE, etc. with null terminator - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockTOCTrack @@ -128,7 +128,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public byte adr; public byte control; public uint lba; - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockTOC @@ -136,7 +136,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public byte first_track; public byte last_track; public byte disc_type; - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockFramebufferInfo @@ -145,7 +145,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX [MarshalAs(UnmanagedType.I4)] public eShockFramebufferFlags flags; public void* ptr; - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockRenderOptions @@ -154,7 +154,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public eShockRenderType renderType; public eShockDeinterlaceMode deinterlaceMode; public bool skip; - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockMemcardTransaction @@ -162,7 +162,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX [MarshalAs(UnmanagedType.I4)] public eShockMemcardTransaction transaction; public void* buffer128k; - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockRegisters_CPU @@ -172,7 +172,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public uint IN_BD_SLOT; public uint LO, HI; public uint SR, CAUSE, EPC; - }; + } [StructLayout(LayoutKind.Sequential)] public struct ShockStateTransaction @@ -181,7 +181,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX public void* buffer; public int bufferLength; public TextStateFPtrs ff; - }; + } [UnmanagedFunctionPointer(CallingConvention.Cdecl)] diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs index 35a4b51dee..6fa82e83a6 100644 --- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs +++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/BizSwan.cs @@ -134,7 +134,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan PS = 12, SS = 13, DS0 = 14 - }; + } [Flags] public enum Buttons : uint diff --git a/BizHawk.Emulation.Cores/Libretro/LibretroApi_Enums.cs b/BizHawk.Emulation.Cores/Libretro/LibretroApi_Enums.cs index 232189f0fd..35da284c5a 100644 --- a/BizHawk.Emulation.Cores/Libretro/LibretroApi_Enums.cs +++ b/BizHawk.Emulation.Cores/Libretro/LibretroApi_Enums.cs @@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Libretro SIG_VideoUpdate, SIG_Sample, SIG_SampleBatch, - }; + } public enum RETRO_MEMORY @@ -42,7 +42,7 @@ namespace BizHawk.Emulation.Cores.Libretro RTC = 1, SYSTEM_RAM = 2, VIDEO_RAM = 3, - }; + } public enum RETRO_DEVICE @@ -55,14 +55,14 @@ namespace BizHawk.Emulation.Cores.Libretro ANALOG = 5, POINTER = 6, SENSOR_ACCELEROMETER = 7 - }; + } public enum RETRO_DEVICE_ID_ANALOG { // LEFT / RIGHT? X = 0, Y = 1 - }; + } public enum RETRO_DEVICE_ID_MOUSE { @@ -70,7 +70,7 @@ namespace BizHawk.Emulation.Cores.Libretro Y = 1, LEFT = 2, RIGHT = 3 - }; + } public enum RETRO_DEVICE_ID_LIGHTGUN { @@ -81,14 +81,14 @@ namespace BizHawk.Emulation.Cores.Libretro TURBO = 4, PAUSE = 5, START = 6 - }; + } public enum RETRO_DEVICE_ID_POINTER { X = 0, Y = 1, PRESSED = 2 - }; + } public enum RETRO_KEY { @@ -236,7 +236,7 @@ namespace BizHawk.Emulation.Cores.Libretro UNDO = 322, LAST - }; + } [Flags] public enum RETRO_MOD @@ -249,14 +249,14 @@ namespace BizHawk.Emulation.Cores.Libretro NUMLOCK = 16, CAPSLOCK = 32, SCROLLLOCK = 64 - }; + } public enum RETRO_DEVICE_ID_SENSOR_ACCELEROMETER { X = 0, Y = 1, Z = 2 - }; + } public enum RETRO_DEVICE_ID_JOYPAD { @@ -276,14 +276,14 @@ namespace BizHawk.Emulation.Cores.Libretro R2 = 13, L3 = 14, R3 = 15 - }; + } public enum eStatus : int { eStatus_Idle, eStatus_CMD, eStatus_BRK - }; + } public enum BufId : int { @@ -303,13 +303,13 @@ namespace BizHawk.Emulation.Cores.Libretro XRGB1555 = 0, XRGB8888 = 1, RGB565 = 2 - }; + } public enum retro_region : uint { NTSC = 0, PAL = 1 - }; + } } } diff --git a/BizHawk.Emulation.Cores/Libretro/LibretroApi_Structs.cs b/BizHawk.Emulation.Cores/Libretro/LibretroApi_Structs.cs index 0c50eeaa39..817e9e8aec 100644 --- a/BizHawk.Emulation.Cores/Libretro/LibretroApi_Structs.cs +++ b/BizHawk.Emulation.Cores/Libretro/LibretroApi_Structs.cs @@ -55,7 +55,7 @@ namespace BizHawk.Emulation.Cores.Libretro [MarshalAs(UnmanagedType.U1)] public bool registered; - }; + } //perf callbacks [UnmanagedFunctionPointer(CallingConvention.Cdecl)] diff --git a/BizHawk.Emulation.Cores/Sound/YM2413.cs b/BizHawk.Emulation.Cores/Sound/YM2413.cs index 81b39682f7..f06c4fc875 100644 --- a/BizHawk.Emulation.Cores/Sound/YM2413.cs +++ b/BizHawk.Emulation.Cores/Sound/YM2413.cs @@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Components Default = 0, VRC7 = 1, YMF281B = 2 - }; + } public YM2413(ChipType type) { @@ -301,7 +301,7 @@ namespace BizHawk.Emulation.Cores.Components static OPLL_PATCH[,] default_patch = new OPLL_PATCH[OPLL_TONE_NUM, (16 + 3) * 2]; /* Definition of envelope mode */ - public enum OPLL_EG_STATE { READY, ATTACK, DECAY, SUSHOLD, SUSTINE, RELEASE, SETTLE, FINISH }; + public enum OPLL_EG_STATE { READY, ATTACK, DECAY, SUSHOLD, SUSTINE, RELEASE, SETTLE, FINISH } /* Phase incr table for Attack */ static uint[,] dphaseARTable = new uint[16, 16]; diff --git a/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs b/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs index 82e0c5f6f2..76a2ec0ac5 100644 --- a/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs +++ b/BizHawk.Emulation.DiscSystem/API_MednaDisc.cs @@ -123,7 +123,7 @@ namespace BizHawk.Emulation.DiscSystem public byte first_track; public byte last_track; public byte disc_type; - }; + } [StructLayout(LayoutKind.Explicit)] public struct MednadiscTOCTrack @@ -136,7 +136,7 @@ namespace BizHawk.Emulation.DiscSystem [FieldOffset(8)] public byte _validByte; public bool Valid { get { return _validByte != 0; } } - }; + } [DllImport("mednadisc.dll", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr mednadisc_LoadCD(string path); diff --git a/BizHawk.Emulation.DiscSystem/DiscJob.cs b/BizHawk.Emulation.DiscSystem/DiscJob.cs index 4762673977..2c796d1596 100644 --- a/BizHawk.Emulation.DiscSystem/DiscJob.cs +++ b/BizHawk.Emulation.DiscSystem/DiscJob.cs @@ -58,5 +58,5 @@ namespace BizHawk.Emulation.DiscSystem class DiscJobAbortException : Exception { - }; + } } \ No newline at end of file diff --git a/Bizware/BizHawk.Bizware.BizwareGL/TexAtlas.cs b/Bizware/BizHawk.Bizware.BizwareGL/TexAtlas.cs index 9730b21d70..0a54e2a692 100644 --- a/Bizware/BizHawk.Bizware.BizwareGL/TexAtlas.cs +++ b/Bizware/BizHawk.Bizware.BizwareGL/TexAtlas.cs @@ -190,7 +190,7 @@ namespace BizHawk.Bizware.BizwareGL public int height; public RectItem ri; - }; + } /// Starts a new packing process to a bin of the given dimension. public void Init(int width, int height) @@ -317,7 +317,7 @@ namespace BizHawk.Bizware.BizwareGL node.height = height; return node; } - }; + } } diff --git a/Common.ruleset b/Common.ruleset index f08b7a8962..18fea3c02d 100644 --- a/Common.ruleset +++ b/Common.ruleset @@ -80,9 +80,6 @@ - - -