diff options
author | 2020-12-18 15:54:52 +1100 | |
---|---|---|
committer | 2020-12-18 15:54:52 +1100 | |
commit | 1df245cb99882892678216c3d0c6e243611d627c (patch) | |
tree | a8f3563a74d58755f4a82d4cbfc2406cf79543b3 /plugins/cheat/init.lua | |
parent | ff9c1a0ca91f925e5c23b22a92a53c83f9f655ba (diff) |
More Lua engine clean-up and documentation, resulting in core cleanup.
More Lua interface cleanup, additional properties and methods, and
documentation migration/expansion.
Emulated switch inputs can have "not" codes applied to host input axis
directions. It works the same way as host switch inputs - push twice
for a "not" prefix.
Input polling helpers no longer need to store state in the input device
items. There’s less leakage, and less chance of things interfering with
each other.
Allow snapshot view options to be configured through the internal UI via
the video options menu. Made video options menus place initial focus on
the currently selected view item. Removed some crud from the menu base
class.
Fixed the description of the "snapview" option. The value to get raw
screen pixels was changed to "native" a long time ago but the
description was never updated.
Re-arranged the Golden Poker button lamps so that the 6-button layouts
for Jolli Witch and Wild Witch make sense. In 6-button mode, the hold
buttons double as bonus game and bet buttons, but the lamp outputs don't
change. The simplest way to deal with this without requiring the user
to switch views or using layout scripting is to place the dedicated
buttons directly below the hold buttons that correspond to them.
Removed some software list data that was redundantly copied into
device_image_interface (m_supported was never even set, so it didn't
even work), and made crc() work better (previously it wasn't
recalculuated after unloading and loading another image).
Made strformat.h and devcb.h play nicer with C++17 and pre-standard
C++20. Format precision now correctly limits the length of string
views. Confirmed that strformat.{h,cpp} works with pre-standard C++20
support in GCC 9.
Removed an auto_alloc from cpu/arm7.
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r-- | plugins/cheat/init.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 2acb377192f..83dbdc7bfb1 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -295,7 +295,7 @@ function cheat.startplugin() error("bpset not permitted in oneshot cheat") return end - local idx = dev:debug():bpset(addr) + local idx = dev.debug:bpset(addr) breaks[idx] = {cheat = cheat, func = func, dev = dev} end @@ -308,7 +308,7 @@ function cheat.startplugin() error("bad space in wpset") return end - local idx = dev.debug():wpset(space, wptype, addr, len) + local idx = dev.debug:wpset(space, wptype, addr, len) watches[idx] = {cheat = cheat, func = func, dev = dev} end @@ -318,12 +318,12 @@ function cheat.startplugin() end for num, bp in pairs(breaks) do if cheat == bp.cheat then - bp.dev.debug():bpclr(num) + bp.dev.debug:bpclr(num) end end for num, wp in pairs(watches) do if cheat == wp.cheat then - wp.dev.debug():wpclr(num) + wp.dev.debug:wpclr(num) end end end @@ -485,7 +485,7 @@ function cheat.startplugin() for name, tag in pairs(cheat.cpu) do if manager:machine():debugger() then local dev = manager:machine().devices[tag] - if not dev or not dev:debug() then + if not dev or not dev.debug then cheat_error(cheat, "missing or invalid device " .. tag) return end @@ -895,7 +895,7 @@ function cheat.startplugin() elseif draw.type == "line" then draw.scr:draw_line(draw.x1, draw.y1, draw.x2, draw.y2, draw.color) elseif draw.type == "box" then - draw.scr:draw_box(draw.x1, draw.y1, draw.x2, draw.y2, draw.bgcolor, draw.linecolor) + draw.scr:draw_box(draw.x1, draw.y1, draw.x2, draw.y2, draw.linecolor, draw.bgcolor) end end output = {} |