1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-06-16 16:33:06 -07:00

misc monitor for oot

This commit is contained in:
Connor Olding 2015-05-26 01:26:42 -07:00
parent abb05dc67e
commit 86173f3014
2 changed files with 30 additions and 8 deletions

View File

@ -125,6 +125,7 @@ return {
event_chk_inf = AL(0xED4, 0x1C),
item_get_inf = AL(0xEF0, 0x8),
inf_table = AL(0xEF8, 0x3C),
checksum = AL(0x1352, 2),
event_inf = AL(0x13FA, 0x8),
magic_max = AL(0x13F4, 2),

View File

@ -1,16 +1,19 @@
require = require "depend"
require "boilerplate"
require "addrs.init"
require "messages"
require "classes"
-- no effect on OoT
local unk_only = false
local unk = ByteMonitor('unk', AL(0xF6, 0x37A))
unk.byvalue = true
unk:load('data/_unk.lua')
local link = ByteMonitor('link', AL(0,0x100C))
local ignore_fields = {
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",
@ -26,20 +29,38 @@ local ignore_fields = {
"inventory_items",
"inventory_masks",
"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",
}
function link:ignore(i)
for _, k in ipairs(ignore_fields) do
local size = addrs[k].type
local v = addrs[k]
if not v then
error('unknown addr: '..tostring(k), 1)
end
local size = v.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
local a = v.addr - self.begin
if i >= a and i < a + size then return true end
end
end
while mm do
if unk_only then
while mm or oot do
if mm and unk_only then
unk:diff()
unk:save()
else