mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
cheat: Make string.char and string.format available to cheats (#12183)
This commit is contained in:
parent
39cd5d6f02
commit
662bc48d9a
@ -453,21 +453,22 @@ function cheat.startplugin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function parse_cheat(cheat)
|
local function parse_cheat(cheat)
|
||||||
cheat.cheat_env = { draw_text = draw_text,
|
cheat.cheat_env = {
|
||||||
draw_line = draw_line,
|
draw_text = draw_text,
|
||||||
draw_box = draw_box,
|
draw_line = draw_line,
|
||||||
tobcd = tobcd,
|
draw_box = draw_box,
|
||||||
frombcd = frombcd,
|
tobcd = tobcd,
|
||||||
pairs = pairs,
|
frombcd = frombcd,
|
||||||
ipairs = ipairs,
|
pairs = pairs,
|
||||||
outputs = manager.machine.output,
|
ipairs = ipairs,
|
||||||
time = time,
|
outputs = manager.machine.output,
|
||||||
input_trans = input_trans,
|
time = time,
|
||||||
input_run = function(list) input_run(cheat, list) end,
|
input_trans = input_trans,
|
||||||
os = { time = os.time, date = os.date, difftime = os.difftime },
|
input_run = function(list) input_run(cheat, list) end,
|
||||||
table =
|
os = { time = os.time, date = os.date, difftime = os.difftime },
|
||||||
{ insert = table.insert,
|
table = { insert = table.insert, remove = table.remove },
|
||||||
remove = table.remove } }
|
string = { format = string.format, char = string.char }
|
||||||
|
}
|
||||||
cheat.enabled = false
|
cheat.enabled = false
|
||||||
cheat.set_enabled = set_enabled;
|
cheat.set_enabled = set_enabled;
|
||||||
cheat.get_enabled = function(cheat) return cheat.enabled end
|
cheat.get_enabled = function(cheat) return cheat.enabled end
|
||||||
|
Loading…
Reference in New Issue
Block a user