1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-18 05:23:22 -07:00

animation ID monitoring script

This commit is contained in:
Connor Olding 2015-02-23 15:37:10 -08:00
parent 595c816dfe
commit 25a0df5ded

27
MM watch animations.lua Executable file
View File

@ -0,0 +1,27 @@
local US_10 = 0x3FFD40
local EU_DBG = 0x461C1A
local versions = {
['D6133ACE5AFAA0882CF214CF88DABA39E266C078'] = US_10,
['B38B71D2961DFFB523020A67F4807A4B704E347A'] = EU_DBG,
}
local hash = gameinfo.getromhash()
local anim_addr = versions[hash]
local anims_seen = {}
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