From ea2df2e91ba7f8d9f4ec575245df347a64f6975b Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 1 Nov 2013 23:49:44 +0000 Subject: [PATCH] move snes lua library to common --- .../BizHawk.Client.Common.csproj | 1 + .../lua}/EmuLuaLibrary.SNES.cs | 52 +++++++++++++++---- .../BizHawk.MultiClient.csproj | 1 - 3 files changed, 43 insertions(+), 11 deletions(-) rename {BizHawk.MultiClient/tools/Lua/Libraries => BizHawk.Client.Common/lua}/EmuLuaLibrary.SNES.cs (54%) diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 49126a987a..017b278f66 100644 --- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -108,6 +108,7 @@ + diff --git a/BizHawk.MultiClient/tools/Lua/Libraries/EmuLuaLibrary.SNES.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.SNES.cs similarity index 54% rename from BizHawk.MultiClient/tools/Lua/Libraries/EmuLuaLibrary.SNES.cs rename to BizHawk.Client.Common/lua/EmuLuaLibrary.SNES.cs index 1c049a38ba..2cc1ddc30e 100644 --- a/BizHawk.MultiClient/tools/Lua/Libraries/EmuLuaLibrary.SNES.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.SNES.cs @@ -1,6 +1,6 @@ -using BizHawk.Client.Common; +using BizHawk.Emulation.Consoles.Nintendo.SNES; -namespace BizHawk.MultiClient +namespace BizHawk.Client.Common { public class SNESLuaLibrary : LuaLibraryBase { @@ -73,42 +73,74 @@ namespace BizHawk.MultiClient public static void snes_setlayer_bg_1(bool value) { - GlobalWinF.MainForm.SNES_ToggleBG1(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowBG1_1 = Global.Config.SNES_ShowBG1_0 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_bg_2(bool value) { - GlobalWinF.MainForm.SNES_ToggleBG2(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowBG2_1 = Global.Config.SNES_ShowBG2_0 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_bg_3(bool value) { - GlobalWinF.MainForm.SNES_ToggleBG3(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowBG3_1 = Global.Config.SNES_ShowBG3_0 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_bg_4(bool value) { - GlobalWinF.MainForm.SNES_ToggleBG4(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowBG4_1 = Global.Config.SNES_ShowBG4_0 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_obj_1(bool value) { - GlobalWinF.MainForm.SNES_ToggleOBJ1(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowOBJ1 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_obj_2(bool value) { - GlobalWinF.MainForm.SNES_ToggleOBJ2(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowOBJ2 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_obj_3(bool value) { - GlobalWinF.MainForm.SNES_ToggleOBJ3(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowOBJ3 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } public static void snes_setlayer_obj_4(bool value) { - GlobalWinF.MainForm.SNES_ToggleOBJ4(value); + if (Global.Emulator is LibsnesCore) + { + Global.Config.SNES_ShowOBJ4 = value; + CoreFileProvider.SyncCoreCommInputSignals(); + } } } } diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index 13dfb743d3..acd52f0a9f 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -451,7 +451,6 @@ - Component