mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
cheat: Make string.char and string.format available to cheats (#12183)
This commit is contained in:
parent
39cd5d6f02
commit
662bc48d9a
@ -453,7 +453,8 @@ 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_text = draw_text,
|
||||||
draw_line = draw_line,
|
draw_line = draw_line,
|
||||||
draw_box = draw_box,
|
draw_box = draw_box,
|
||||||
tobcd = tobcd,
|
tobcd = tobcd,
|
||||||
@ -465,9 +466,9 @@ function cheat.startplugin()
|
|||||||
input_trans = input_trans,
|
input_trans = input_trans,
|
||||||
input_run = function(list) input_run(cheat, list) end,
|
input_run = function(list) input_run(cheat, list) end,
|
||||||
os = { time = os.time, date = os.date, difftime = os.difftime },
|
os = { time = os.time, date = os.date, difftime = os.difftime },
|
||||||
table =
|
table = { insert = table.insert, remove = table.remove },
|
||||||
{ insert = table.insert,
|
string = { format = string.format, char = string.char }
|
||||||
remove = table.remove } }
|
}
|
||||||
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