From a68b80ad3657367a0f94713b604ed280827d6487 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 28 Sep 2012 17:32:01 +0000 Subject: [PATCH] Lua - implement functions: nes.getallowmorethaneightsprites() and nes.setallowmorethaneightsprites() --- BizHawk.MultiClient/LuaImplementation.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/BizHawk.MultiClient/LuaImplementation.cs b/BizHawk.MultiClient/LuaImplementation.cs index 8777c3215a..999faff57e 100644 --- a/BizHawk.MultiClient/LuaImplementation.cs +++ b/BizHawk.MultiClient/LuaImplementation.cs @@ -548,6 +548,8 @@ namespace BizHawk.MultiClient "setdispbackground", "getdispsprites", "setdispsprites", + "getallowmorethaneightsprites", + "setallowmorethaneightsprites", "addgamegenie", "removegamegenie", }; @@ -2541,6 +2543,20 @@ namespace BizHawk.MultiClient Global.MainForm.SyncCoreInputComm(); } + public bool nes_getallowmorethaneightsprites() + { + return Global.Config.NESAllowMoreThanEightSprites; + } + + public void nes_setallowmorethaneightsprites(bool allow) + { + Global.Config.NESAllowMoreThanEightSprites = allow; + if (Global.Emulator is NES) + { + (Global.Emulator as NES).CoreInputComm.NES_UnlimitedSprites = allow; + } + } + public void nes_addgamegenie(string code) { if (Global.Emulator is NES)