mirror of
https://github.com/notwa/mm
synced 2024-11-05 02:49: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 "messages"
|
||||||
require "classes"
|
require "classes"
|
||||||
|
|
||||||
|
local suffix = oot and " oot" or ""
|
||||||
|
local damage_names = require("data.damage names"..suffix)
|
||||||
|
|
||||||
-- check for errors in the actor linked lists
|
-- check for errors in the actor linked lists
|
||||||
local validate = false
|
local validate = false
|
||||||
|
|
||||||
|
|
|
@ -162,6 +162,9 @@ return {
|
||||||
z_cursor_actor = AG(0x1CC8, 4),
|
z_cursor_actor = AG(0x1CC8, 4),
|
||||||
z_target_actor = AG(0x1CCC, 4),
|
z_target_actor = AG(0x1CCC, 4),
|
||||||
|
|
||||||
|
room_number = AG(0x11CBC, 1),
|
||||||
|
room_pointer = AG(0x11CC8, 4),
|
||||||
|
|
||||||
link_actor = setmetatable({
|
link_actor = setmetatable({
|
||||||
item_in_hand = AA(0x142, 1),
|
item_in_hand = AA(0x142, 1),
|
||||||
animation_id = AA(0x1AE, 2),
|
animation_id = AA(0x1AE, 2),
|
||||||
|
|
|
@ -9,7 +9,6 @@ local actor_t = Actor(0)
|
||||||
|
|
||||||
local suffix = oot and " oot" or ""
|
local suffix = oot and " oot" or ""
|
||||||
local actor_names = require("data.actor names"..suffix)
|
local actor_names = require("data.actor names"..suffix)
|
||||||
local damage_names = require("data.damage names"..suffix)
|
|
||||||
|
|
||||||
local ActorLister = Class()
|
local ActorLister = Class()
|
||||||
function ActorLister:init(input_handler, debug_mode)
|
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 "addrs.init"
|
||||||
require "messages"
|
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 print = dprint
|
||||||
local printf = dprintf
|
local printf = dprintf
|
||||||
|
|
||||||
|
@ -134,26 +138,24 @@ function dump_room(start, addr)
|
||||||
|
|
||||||
if actors then
|
if actors then
|
||||||
print("# actors")
|
print("# actors")
|
||||||
local actor_names = require "data.actor names"
|
|
||||||
local buf = ""
|
local buf = ""
|
||||||
for i = 0, actor_n - 1 do
|
for i = 0, actor_n - 1 do
|
||||||
local id = R2(actors + 16*i)
|
local id = R2(actors + 16*i)
|
||||||
id = bit.band(id, 0x0FFF)
|
id = bit.band(id, 0x0FFF)
|
||||||
local name = actor_names[id]
|
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
|
end
|
||||||
print(buf)
|
print(buf)
|
||||||
end
|
end
|
||||||
|
|
||||||
if objects then
|
if objects then
|
||||||
print("# objects")
|
print("# objects")
|
||||||
local object_names = require "data.object names"
|
|
||||||
local buf = ""
|
local buf = ""
|
||||||
for i = 0, object_n - 1 do
|
for i = 0, object_n - 1 do
|
||||||
local id = R2(objects + 2*i)
|
local id = R2(objects + 2*i)
|
||||||
local rid = bit.band(id, 0x0FFF)
|
local rid = bit.band(id, 0x0FFF)
|
||||||
local name = object_names[rid]
|
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
|
end
|
||||||
print(buf)
|
print(buf)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue