diff options
author | 2020-12-27 01:32:37 +1100 | |
---|---|---|
committer | 2020-12-27 01:32:37 +1100 | |
commit | 9e36b6a6d951ea6f2d72cab874c3c8e72d001001 (patch) | |
tree | c41bfd0c1b499d790c4091eb266caf6955219fc1 /docs/source/techspecs/luaengine.rst | |
parent | 509c946736b5f02cac84d19f2cde4e966d637a2c (diff) |
More Lua interface cleanup - it's simpler with cleaner underlyng APIs.
Made the sound manager mute controls readable, and got rid of system
enable since it just controls system mute anyway. This was causing
confusion: phantom2 was trying to use both independentlyt casuing the
mute bit to be ignored.
THe Lua interface changes are mostly changing methods to properties,
some renames to make things clearer, and some additional properties for
better control over snapshots.
Diffstat (limited to 'docs/source/techspecs/luaengine.rst')
-rw-r--r-- | docs/source/techspecs/luaengine.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/source/techspecs/luaengine.rst b/docs/source/techspecs/luaengine.rst index 68790f108ae..d133ce1f51a 100644 --- a/docs/source/techspecs/luaengine.rst +++ b/docs/source/techspecs/luaengine.rst @@ -117,10 +117,10 @@ screens: :: - [MAME]> for tag, screen in pairs(manager:machine().screens) do print(tag) end + [MAME]> for tag, screen in pairs(manager.machine.screens) do print(tag) end :screen -``manager:machine()`` is the root object of your currently running machine: we +``manager.machine`` is the root object of your currently running machine: we will be using this often. ``screens`` is a table with all available screens; most machines only have one main screen. In our case, the main and only screen is tagged as ``:screen``, and we can further inspect it: @@ -128,7 +128,7 @@ is tagged as ``:screen``, and we can further inspect it: :: [MAME]> -- keep a reference to the main screen in a variable - [MAME]> s = manager:machine().screens[":screen"] + [MAME]> s = manager.machine.screens[":screen"] [MAME]> print(s.width .. "x" .. s.height) 320x224 @@ -160,7 +160,7 @@ Similarly to screens, you can inspect all the devices attached to a machine: :: - [MAME]> for tag, device in pairs(manager:machine().devices) do print(tag) end + [MAME]> for tag, device in pairs(manager.machine.devices) do print(tag) end :audiocpu :maincpu :saveram @@ -172,7 +172,7 @@ On some of them, you can also inspect and manipulate memory and state: :: - [MAME]> cpu = manager:machine().devices[":maincpu"] + [MAME]> cpu = manager.machine.devices[":maincpu"] [MAME]> -- enumerate, read and write state registers [MAME]> for k, v in pairs(cpu.state) do print(k) end D5 |