1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 04:29:03 -08:00
mm/Lua/watch animations.lua

154 lines
3.3 KiB
Lua
Executable file

local addrs = require "addrs"
local anim_addr = addrs.link_actor.animation_id.addr
local anims_seen = {
[0xCF68] = true,
[0xCF70] = true,
[0xCFE0] = true,
[0xCFE8] = true,
[0xD068] = true,
[0xD088] = true,
[0xD090] = true,
[0xD098] = true,
[0xD0A8] = true,
[0xD0C8] = true,
[0xD0D0] = true,
[0xD0D8] = true,
[0xD140] = true,
[0xD148] = true,
[0xD308] = true,
[0xD448] = true,
[0xD450] = true,
[0xD5A0] = true,
[0xD5A8] = true,
[0xD5B0] = true,
[0xD698] = true,
[0xD6A0] = true,
[0xD6A8] = true,
[0xD720] = true,
[0xD728] = true,
[0xD730] = true,
[0xD770] = true,
[0xD780] = true,
[0xD788] = true,
[0xD790] = true,
[0xD7A8] = true,
[0xD7B8] = true,
[0xD7F0] = true,
[0xD800] = true,
[0xD858] = true,
[0xD868] = true,
[0xD878] = true,
[0xD890] = true,
[0xD898] = true,
[0xD8B0] = true,
[0xD8C8] = true,
[0xD8D8] = true,
[0xD918] = true,
[0xD920] = true,
[0xD928] = true,
[0xD930] = true,
[0xD938] = true,
[0xD988] = true,
[0xD990] = true,
[0xD998] = true,
[0xD9A0] = true,
[0xDA60] = true,
[0xDA68] = true,
[0xDA70] = true,
[0xDA78] = true,
[0xDA80] = true,
[0xDAC0] = true,
[0xDB10] = true,
[0xDB18] = true,
[0xDB28] = true,
[0xDC00] = true,
[0xDC08] = true,
[0xDC30] = true,
[0xDC40] = true,
[0xDCD8] = true,
[0xDCE0] = true,
[0xDCE8] = true,
[0xDCF0] = true,
[0xDCF8] = true,
[0xDD10] = true,
[0xDD18] = true,
[0xDD20] = true,
[0xDD28] = true,
[0xDD30] = true,
[0xDDB0] = true,
[0xDDB8] = true,
[0xDE40] = true,
[0xDE48] = true,
[0xDE50] = true,
[0xDE68] = true,
[0xDE70] = true,
[0xDE78] = true,
[0xDE80] = true,
[0xDE88] = true,
[0xDE90] = true,
[0xDEA0] = true,
[0xDEA8] = true,
[0xDEB8] = true,
[0xDEC8] = true,
[0xDED0] = true,
[0xDEE0] = true,
[0xDEE8] = true,
[0xDF20] = true,
[0xDF28] = true,
[0xDF30] = true,
[0xDF48] = true,
[0xDF50] = true,
[0xDF58] = true,
[0xDF60] = true,
[0xDF68] = true,
[0xDF70] = true,
[0xDFC8] = true,
[0xDFD0] = true,
[0xDFD8] = true,
[0xDFE0] = true,
[0xDFE8] = true,
[0xE000] = true,
[0xE0B0] = true,
[0xE0B8] = true,
[0xE0D8] = true,
[0xE0E0] = true,
[0xE0E8] = true,
[0xE0F0] = true,
[0xE208] = true,
[0xE210] = true,
[0xE218] = true,
[0xE228] = true,
[0xE230] = true,
[0xE240] = true,
[0xE248] = true,
[0xE258] = true,
[0xE260] = true,
[0xE270] = true,
[0xE2E0] = true,
[0xE308] = true,
[0xE320] = true,
[0xE338] = true,
[0xE348] = true,
[0xE3A8] = true,
[0xE3F0] = true,
[0xE3F8] = true,
[0xE400] = true,
[0xE410] = true,
[0xE450] = true,
}
while true 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)
local frame = emu.framecount()
if actor_loaded then
gui.text(2, 4, hexid, nil, 'white', "bottomleft")
if not anims_seen[anim_id] then
anims_seen[anim_id] = true
print(frame, hexid)
end
end
emu.yield()
end