From 736804be40299daf9dba5849b1eb95951a471f5a Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 1 May 2015 11:48:49 -0700 Subject: [PATCH] tweaks --- Lua/actor lister.lua | 2 +- Lua/data/_ootmemod.lua | 3 +++ Lua/oot memory editor monitor.lua | 9 ++------- Lua/watch animations.lua | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Lua/actor lister.lua b/Lua/actor lister.lua index e486800..a42c99d 100755 --- a/Lua/actor lister.lua +++ b/Lua/actor lister.lua @@ -327,7 +327,7 @@ local function runwrap(now) end event.onloadstate(wipe, 'actor wipe') -while true do +while oot or mm do local now = emu.framecount() runwrap(now) emu.frameadvance() diff --git a/Lua/data/_ootmemod.lua b/Lua/data/_ootmemod.lua index 4bba4ef..5e3c36d 100644 --- a/Lua/data/_ootmemod.lua +++ b/Lua/data/_ootmemod.lua @@ -51,6 +51,7 @@ return { [575] = true, [576] = true, [578] = true, + [583] = true, [584] = true, [591] = true, [592] = true, @@ -114,8 +115,10 @@ return { [1939] = true, [1940] = true, [1941] = true, + [1942] = true, [1943] = true, [1944] = true, + [1945] = true, [1965] = true, [1967] = true, [1968] = true, diff --git a/Lua/oot memory editor monitor.lua b/Lua/oot memory editor monitor.lua index 5eb7d9a..f6e93dc 100644 --- a/Lua/oot memory editor monitor.lua +++ b/Lua/oot memory editor monitor.lua @@ -25,12 +25,7 @@ end ShortMonitor = Class(Monitor) function ShortMonitor:init(name, a) - self.name = name - self.begin = a.addr - self.len = a.type - self.once = false - self.old_bytes = {} - + Monitor.init(self, name, a) self.modified = {} self.dirty = false end @@ -51,7 +46,7 @@ function ShortMonitor:dump() local ih = i local block, page, row = distribute_index(ih) local mod = self.modified[ih] - local value = R2(self.begin + ih) + local value = R2(self.begin + ih*2) local vs = mod and 'n/a' or ('%04X'):format(value) local name = ('%s%02i'):format(blocknames[block+1], page*16 + row) local s = ('%s\t%i\t%i\t%s\n'):format(name, page+1, row+1, vs) diff --git a/Lua/watch animations.lua b/Lua/watch animations.lua index 656acad..36a832d 100755 --- a/Lua/watch animations.lua +++ b/Lua/watch animations.lua @@ -5,7 +5,7 @@ local anim_addr = addrs.link_actor.animation_id.addr local fn = 'data/_anims_seen.lua' local anims_seen = deserialize(fn) or {} -while true do +while mm do local anim_id = mainmemory.read_u16_be(anim_addr) local actor_loaded = mainmemory.read_u8(anim_addr - 2) == 4 local hexid = ('%04X'):format(anim_id)