mirror of
https://github.com/notwa/mm
synced 2024-11-05 00:19:02 -08:00
room stuff for oot; fixes
This commit is contained in:
parent
464ef93b8f
commit
19a0e65352
5 changed files with 13 additions and 5 deletions
|
@ -4,6 +4,9 @@ require "addrs.init"
|
|||
require "messages"
|
||||
require "classes"
|
||||
|
||||
local suffix = oot and " oot" or ""
|
||||
local damage_names = require("data.damage names"..suffix)
|
||||
|
||||
-- check for errors in the actor linked lists
|
||||
local validate = false
|
||||
|
||||
|
|
|
@ -162,6 +162,9 @@ return {
|
|||
z_cursor_actor = AG(0x1CC8, 4),
|
||||
z_target_actor = AG(0x1CCC, 4),
|
||||
|
||||
room_number = AG(0x11CBC, 1),
|
||||
room_pointer = AG(0x11CC8, 4),
|
||||
|
||||
link_actor = setmetatable({
|
||||
item_in_hand = AA(0x142, 1),
|
||||
animation_id = AA(0x1AE, 2),
|
||||
|
|
|
@ -9,7 +9,6 @@ local actor_t = Actor(0)
|
|||
|
||||
local suffix = oot and " oot" or ""
|
||||
local actor_names = require("data.actor names"..suffix)
|
||||
local damage_names = require("data.damage names"..suffix)
|
||||
|
||||
local ActorLister = Class()
|
||||
function ActorLister:init(input_handler, debug_mode)
|
||||
|
|
1
Lua/data/object names oot.lua
Normal file
1
Lua/data/object names oot.lua
Normal file
|
@ -0,0 +1 @@
|
|||
return {}
|
|
@ -2,6 +2,10 @@ require "boilerplate"
|
|||
require "addrs.init"
|
||||
require "messages"
|
||||
|
||||
local suffix = oot and " oot" or ""
|
||||
local actor_names = require("data.actor names"..suffix)
|
||||
local object_names = require("data.object names"..suffix)
|
||||
|
||||
local print = dprint
|
||||
local printf = dprintf
|
||||
|
||||
|
@ -134,26 +138,24 @@ function dump_room(start, addr)
|
|||
|
||||
if actors then
|
||||
print("# actors")
|
||||
local actor_names = require "data.actor names"
|
||||
local buf = ""
|
||||
for i = 0, actor_n - 1 do
|
||||
local id = R2(actors + 16*i)
|
||||
id = bit.band(id, 0x0FFF)
|
||||
local name = actor_names[id]
|
||||
buf = buf..("%04X: %s\n"):format(id, name or "unset")
|
||||
buf = buf..("%04X: %s\n"):format(id, name or "undefined")
|
||||
end
|
||||
print(buf)
|
||||
end
|
||||
|
||||
if objects then
|
||||
print("# objects")
|
||||
local object_names = require "data.object names"
|
||||
local buf = ""
|
||||
for i = 0, object_n - 1 do
|
||||
local id = R2(objects + 2*i)
|
||||
local rid = bit.band(id, 0x0FFF)
|
||||
local name = object_names[rid]
|
||||
buf = buf..("%04X: %s\n"):format(id, name or "unset")
|
||||
buf = buf..("%04X: %s\n"):format(id, name or "undefined")
|
||||
end
|
||||
print(buf)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue