summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2020-09-13 10:00:00 -0500
committer cracyc <cracyc@users.noreply.github.com>2020-09-13 10:00:54 -0500
commit9c4d1457dad0e82860d45c76cee04aa8d33a13c4 (patch)
treee7e692c51f563389dbcd99577e8fd89f5c892f5d
parent9b582574922cb7af1a9a31c1182c300b90a20c43 (diff)
plugins: add emu.plugin table to contain plugin exported interfaces
-rw-r--r--plugins/boot.lua2
-rw-r--r--plugins/cheat/init.lua2
-rw-r--r--plugins/cheatfind/init.lua6
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/boot.lua b/plugins/boot.lua
index 52c56912a0f..09be30ee401 100644
--- a/plugins/boot.lua
+++ b/plugins/boot.lua
@@ -22,7 +22,7 @@ function lfs.env_replace(str)
end
_G._ = emu.lang_translate
-
+_G.emu.plugin = {} -- table to contain plugin interfaces
-- substitute environment variables in the plugins path from options
local dirs = lfs.env_replace(manager:options().entries.pluginspath:value())
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index 4c97c321d6b..3ac15851404 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -897,7 +897,7 @@ function cheat.startplugin()
return list
end
- _G.ce = ce
+ _G.emu.plugin.cheat = ce
end
diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua
index 62b11e8970f..729aed26cb0 100644
--- a/plugins/cheatfind/init.lua
+++ b/plugins/cheatfind/init.lua
@@ -251,7 +251,7 @@ function cheatfind.startplugin()
return cheat.compnext(newdata, olddata, oldmatch, oper, format, val, bcd, step)
end
- _G.cf = cheat
+ _G.emu.plugin.cheatfind = cheat
local devtable = {}
local devsel = 1
local devcur = 1
@@ -937,10 +937,10 @@ function cheatfind.startplugin()
cheat.script.run = "cpu:write_" .. wid .. "(" .. match.addr .. "," .. pokevalue .. ")"
end
if match.mode == 1 then
- if not _G.ce then
+ if not emu.plugin.cheat then
manager:machine():popmessage(_("Cheat engine not available"))
else
- _G.ce.inject(cheat)
+ emu.plugin.cheat.inject(cheat)
end
elseif match.mode == 2 then
cheat_save = {}