From 433a99cb43486c8de860448e3b3b7b4ad1930d2f Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 25 Nov 2015 03:02:21 -0800 Subject: [PATCH] misc monitor tweaks --- Lua/addrs/M/common.lua | 1 + Lua/misc monitor.lua | 72 ++++++++++++++++++++++-------------------- 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Lua/addrs/M/common.lua b/Lua/addrs/M/common.lua index 8283034..3ad6c45 100755 --- a/Lua/addrs/M/common.lua +++ b/Lua/addrs/M/common.lua @@ -103,6 +103,7 @@ return { exit_value = AL(0x02, 2), mask_worn = AL(0x04, 1), intro_completed = AL(0x05, 1), + anti_mash_timer = AL(0x06, 1), cutscene_status = AL(0x0A, 2), time = AL(0x0C, 2), owl_id = AL(0x0E, 2), diff --git a/Lua/misc monitor.lua b/Lua/misc monitor.lua index e7ede06..fdf0edd 100644 --- a/Lua/misc monitor.lua +++ b/Lua/misc monitor.lua @@ -14,44 +14,48 @@ unk:load('data/_unk.lua') local size = addrs.checksum.addr - addrs.exit_value.addr + 4 local link = ByteMonitor('link', AL(0, size)) local ignore_fields = mm and { - "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", + addrs.exit_value, + addrs.mask_worn, + addrs.anti_mash_timer, + addrs.cutscene_status, + addrs.time, + addrs.transformation, + addrs.hearts, + addrs.magic, + addrs.rupees, + addrs.navi_timer, + addrs.inventory.b_button_item, + addrs.inventory.c_left_item, + addrs.inventory.c_down_item, + addrs.inventory.c_right_item, + addrs.inventory.c_left_slot, + addrs.inventory.c_down_slot, + addrs.inventory.c_right_slot, + addrs.scene_flags_save, + addrs.week_event_reg, + addrs.event_inf, + addrs.inventory_items, + addrs.inventory_masks, + addrs.inventory_quantities, } or { - "exit_value", - "cutscene_status", - "time", - "hearts", - "magic", - "rupees", - "navi_timer", - "scene_flags_save", - "inventory_items", - "inventory_quantities", - "event_chk_inf", - "item_get_inf", - "inf_table", - "event_inf", + addrs.exit_value, + addrs.cutscene_status, + addrs.time, + addrs.hearts, + addrs.magic, + addrs.rupees, + addrs.navi_timer, + addrs.scene_flags_save, + addrs.inventory_items, + addrs.inventory_quantities, + addrs.event_chk_inf, + addrs.item_get_inf, + addrs.inf_table, + addrs.event_inf, } function link:ignore(i) - for _, k in ipairs(ignore_fields) do - local v = addrs[k] - if not v then - error('unknown addr: '..tostring(k), 1) - end + for _, v in pairs(ignore_fields) do local size = v.type if size == 'f' then size = 4 end local a = v.addr - self.begin