Lua - nes library - get/set methods for sprites and background display

This commit is contained in:
adelikat 2012-09-23 18:57:33 +00:00
parent 48d6ca1fa0
commit 2f8561a81d
2 changed files with 27 additions and 1 deletions

View File

@ -544,6 +544,10 @@ namespace BizHawk.MultiClient
"getbottomscanline",
"getclipleftandright",
"setclipleftandright",
"getdispbackground",
"setdispbackground",
"getdispsprites",
"setdispsprites",
};
/****************************************************/
/*************function definitions********************/
@ -2512,5 +2516,27 @@ namespace BizHawk.MultiClient
(Global.Emulator as NES).SetClipLeftAndRight(leftandright);
}
}
public bool nes_getdispbackground()
{
return Global.Config.NESDispBackground;
}
public void nes_setdispbackground(bool show)
{
Global.Config.NESDispBackground = show;
Global.MainForm.SyncCoreInputComm();
}
public bool nes_getdispsprites()
{
return Global.Config.NESDispSprites;
}
public void nes_setdispsprites(bool show)
{
Global.Config.NESDispSprites = show;
Global.MainForm.SyncCoreInputComm();
}
}
}

View File

@ -326,7 +326,7 @@ namespace BizHawk.MultiClient
base.Dispose(disposing);
}
void SyncCoreInputComm()
public void SyncCoreInputComm()
{
Global.CoreInputComm.NES_BackdropColor = Global.Config.NESBackgroundColor;
Global.CoreInputComm.NES_UnlimitedSprites = Global.Config.NESAllowMoreThanEightSprites;