1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 02:59:03 -08:00
mm/Lua/misc monitor.lua

52 lines
1,012 B
Lua
Raw Normal View History

require "boilerplate"
require "addrs.init"
require "messages"
2015-05-26 00:40:12 -07:00
require "classes"
local unk_only = false
local unk = ByteMonitor('unk', AL(0xF6, 0x37A))
2015-05-26 00:40:12 -07:00
unk.byvalue = true
unk:load('data/_unk.lua')
2015-05-26 00:40:12 -07:00
local link = ByteMonitor('link', AL(0,0x100C))
local ignore_fields = {
"exit_value",
"mask_worn",
"cutscene_status",
"time",
"transformation",
"hearts",
"magic",
"rupees",
"navi_timer",
"scene_flags_save",
"week_event_reg",
"event_inf",
"inventory_items",
"inventory_masks",
"inventory_quantities",
}
function link:ignore(i)
for _, k in ipairs(ignore_fields) do
local size = addrs[k].type
if size == 'f' then size = 4 end
local a = addrs[k].addr - self.begin
local b = a + size
if i >= a and i < b then return true end
end
end
while mm do
2015-05-26 00:40:12 -07:00
if unk_only then
unk:diff()
unk:save()
else
link:diff()
end
draw_messages()
2015-05-26 00:40:12 -07:00
print_deferred()
emu.frameadvance()
end