diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/boot.lua | 2 | ||||
-rw-r--r-- | plugins/cheat/init.lua | 20 | ||||
-rw-r--r-- | plugins/dummy/init.lua | 6 | ||||
-rw-r--r-- | plugins/hiscore/init.lua | 18 |
4 files changed, 23 insertions, 23 deletions
diff --git a/plugins/boot.lua b/plugins/boot.lua index 8417a979fb1..4662b6bff0c 100644 --- a/plugins/boot.lua +++ b/plugins/boot.lua @@ -19,7 +19,7 @@ for file in lfs.dir("plugins") do if (meta["plugin"]["type"]=="plugin") and (manager:plugins().entries[meta["plugin"]["name"]]~=nil) then local entry = manager:plugins().entries[meta["plugin"]["name"]] if (entry:value()==true) then - print("Starting plugin " .. meta["plugin"]["name"] .. "...") + emu.print_verbose("Starting plugin " .. meta["plugin"]["name"] .. "...") plugin = require(meta["plugin"]["name"]) if plugin.set_folder~=nil then plugin.set_folder("plugins/" .. file) end plugin.startplugin(); diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index ec5078fedf0..ea6f4bba3fb 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -112,7 +112,7 @@ function cheat.startplugin() line = line + 1 end if not screen then - print("draw_text: invalid screen") + emu.print_verbose("draw_text: invalid screen") return end if type(x) == "string" then @@ -123,7 +123,7 @@ function cheat.startplugin() local function draw_line(screen, x1, y1, x2, y2, color) if not screen then - print("draw_line: invalid screen") + emu.print_verbose("draw_line: invalid screen") return end output[#output + 1] = { type = "line", scr = screen, x1 = x1, x2 = x2, y1 = y1, y2 = y2, color = color } @@ -131,7 +131,7 @@ function cheat.startplugin() local function draw_box(screen, x1, y1, x2, y2, bgcolor, linecolor) if not screen then - print("draw_box: invalid screen") + emu.print_verbose("draw_box: invalid screen") return end output[#output + 1] = { type = "box", scr = screen, x1 = x1, x2 = x2, y1 = y1, y2 = y2, bgcolor = bgcolor, linecolor = linecolor } @@ -184,7 +184,7 @@ function cheat.startplugin() for name, script in pairs(cheat.script) do script, err = load(script, cheat.desc .. name, "t", cheat.cheat_env) if not script then - print("error loading cheat script: " .. cheat.desc .. " " .. err) + emu.print_verbose("error loading cheat script: " .. cheat.desc .. " " .. err) cheat = { desc = cheat.desc .. " error" } return end @@ -199,7 +199,7 @@ function cheat.startplugin() local cpu, mem cpu = manager:machine().devices[space.tag] if not cpu then - print("error loading cheat script: " .. cheat.desc) + emu.print_verbose("error loading cheat script: " .. cheat.desc) cheat = { desc = cheat.desc .. " error" } return end @@ -209,7 +209,7 @@ function cheat.startplugin() mem = cpu.spaces["program"] end if not mem then - print("error loading cheat script: " .. cheat.desc) + emu.print_verbose("error loading cheat script: " .. cheat.desc) cheat = { desc = cheat.desc .. " error" } return end @@ -232,7 +232,7 @@ function cheat.startplugin() local mem mem = manager:machine():memory().regions[region] if not mem then - print("error loading cheat script: " .. cheat.desc) + emu.print_verbose("error loading cheat script: " .. cheat.desc) cheat = { desc = cheat.desc .. " error" } return end @@ -244,7 +244,7 @@ function cheat.startplugin() local ram ram = manager:machine().devices[ram] if not ram then - print("error loading cheat script: " .. cheat.desc) + emu.print_verbose("error loading cheat script: " .. cheat.desc) cheat = { desc = cheat.desc .. " error" } return end @@ -531,14 +531,14 @@ function cheat.startplugin() cheat = cheats[index] if cheat then for k, v in pairs(cheat.cheat_env) do - print(k, v) + emu.print_verbose(k, v) end end end function ce.list() for num, cheat in pairs(cheats) do - print(num, cheat.desc) + emu.print_verbose(num, cheat.desc) end end diff --git a/plugins/dummy/init.lua b/plugins/dummy/init.lua index 8058bcad452..1f78851a936 100644 --- a/plugins/dummy/init.lua +++ b/plugins/dummy/init.lua @@ -11,11 +11,11 @@ local dummy = exports function dummy.startplugin() emu.register_start(function() - print("Starting " .. emu.gamename()) + emu.print_verbose("Starting " .. emu.gamename()) end) emu.register_stop(function() - print("Exiting " .. emu.gamename()) + emu.print_verbose("Exiting " .. emu.gamename()) end) local function menu_populate() @@ -23,7 +23,7 @@ function dummy.startplugin() end local function menu_callback(index, event) - print("index: " .. index .. " event: " .. event) + emu.print_verbose("index: " .. index .. " event: " .. event) return false end diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua index 647aca11608..877c8372c70 100644 --- a/plugins/hiscore/init.lua +++ b/plugins/hiscore/init.lua @@ -129,14 +129,14 @@ function hiscore.startplugin() local function write_scores ( posdata ) - print("write_scores") + emu.print_verbose("write_scores") local output = io.open(get_file_name(), "wb"); if not output then -- attempt to create the directory, and try again lfs.mkdir( hiscore_path ); output = io.open(get_file_name(), "wb"); end - print("write_scores output") + emu.print_verbose("write_scores output") if output then for ri,row in ipairs(posdata) do t = {}; @@ -147,7 +147,7 @@ function hiscore.startplugin() end output:close(); end - print("write_scores end") + emu.print_verbose("write_scores end") end @@ -184,10 +184,10 @@ function hiscore.startplugin() if check_mem( positions ) then default_checksum = check_scores( positions ); if read_scores( positions ) then - print( "scores read", "OK" ); + emu.print_verbose( "scores read", "OK" ); else -- likely there simply isn't a .hi file around yet - print( "scores read", "FAIL" ); + emu.print_verbose( "scores read", "FAIL" ); end scores_have_been_read = true; current_checksum = check_scores( positions ); @@ -219,7 +219,7 @@ function hiscore.startplugin() write_scores( positions ); current_checksum = checksum; last_write_time = emu.time(); - -- print( "SAVE SCORES EVENT!", last_write_time ); + -- emu.print_verbose( "SAVE SCORES EVENT!", last_write_time ); end end end @@ -243,13 +243,13 @@ function hiscore.startplugin() mem_check_passed = false scores_have_been_read = false; last_write_time = -10 - print("Starting " .. emu.gamename()) + emu.print_verbose("Starting " .. emu.gamename()) local dat = read_hiscore_dat() if dat and dat ~= "" then - print( "found hiscore.dat entry for " .. emu.romname() ); + emu.print_verbose( "found hiscore.dat entry for " .. emu.romname() ); positions = parse_table( dat ); if not positions then - print("hiscore.dat parse error"); + emu.print_error("hiscore.dat parse error"); return; end found_hiscore_entry = true |