From beb0b5a74d7e6d1a9b980b08ca33dd32b01b808d Mon Sep 17 00:00:00 2001 From: taotao54321 Date: Sun, 11 Mar 2012 05:47:38 +0000 Subject: [PATCH] Lua: added setrenderplanes(). For now, it works only for NES. --- BizHawk.MultiClient/LuaImplementation.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/BizHawk.MultiClient/LuaImplementation.cs b/BizHawk.MultiClient/LuaImplementation.cs index 245fec4796..c0792bf726 100644 --- a/BizHawk.MultiClient/LuaImplementation.cs +++ b/BizHawk.MultiClient/LuaImplementation.cs @@ -170,6 +170,7 @@ namespace BizHawk.MultiClient //"registerbefore", //"registerafter", //"register", + "setrenderplanes", }; public static string[] MemoryFunctions = new string[] @@ -357,6 +358,16 @@ namespace BizHawk.MultiClient return Global.Emulator.SystemId; } + // TODO: variable arguments + public void emu_setrenderplanes(object lua_p0, object lua_p1) + { + if (Global.Emulator is BizHawk.Emulation.Consoles.Nintendo.NES) + { + Global.CoreInputComm.NES_ShowOBJ = Global.Config.NESDispSprites = (bool)lua_p0; + Global.CoreInputComm.NES_ShowBG = Global.Config.NESDispBackground = (bool)lua_p1; + } + } + //---------------------------------------------------- //Memory library //----------------------------------------------------