1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 00:29:02 -08:00

more actor addresses, many unknowns

This commit is contained in:
Connor Olding 2015-05-15 20:20:37 -07:00
parent c142f4558c
commit d958938234
3 changed files with 72 additions and 27 deletions

View file

@ -4,15 +4,37 @@ function Actor(addr)
return { return {
num = AA(0x0, 2), num = AA(0x0, 2),
type = AA(0x2, 1), type = AA(0x2, 1),
unk_3 = AA(0x3, 1),
flags = AA(0x4, 4), flags = AA(0x4, 4),
x_copy = AA(0x8, 'f'), x_copy = AA(0x8, 'f'),
y_copy = AA(0xC, 'f'), y_copy = AA(0xC, 'f'),
z_copy = AA(0x10, 'f'), z_copy = AA(0x10, 'f'),
x_rot_init = AA(0x14, 2), -- verify somehow?
y_rot_init = AA(0x16, 2),
z_rot_init = AA(0x18, 2),
unk_1A = AA(0x1A, 2), -- padding?
var = AA(0x1C, 2), var = AA(0x1C, 2),
unk_1E = AA(0x1E, 1), -- actor type? set to -1 to unload actor
unk_1F = AA(0x1F, 1), -- link: 0x03
unk_20 = AA(0x20, 4), -- link: 0x03FF0000
x = AA(0x24, 'f'), x = AA(0x24, 'f'),
y = AA(0x28, 'f'), y = AA(0x28, 'f'),
z = AA(0x2C, 'f'), z = AA(0x2C, 'f'),
angle_old = AA(0x4A, 2), x_rot_init_2 = AA(0x30, 2), -- z-target facing angle?
y_rot_init_2 = AA(0x32, 2), -- link's head Y rot (lerped FPS angle)
z_rot_init_2 = AA(0x34, 2),
unk_36 = AA(0x36, 2), -- padding?
unk_38 = AA(0x38, 4),
x_copy_2 = AA(0x3C, 'f'), -- actually a bone coordinate?
y_copy_2 = AA(0x40, 'f'),
z_copy_2 = AA(0x44, 'f'),
fps_vert_angle = AA(0x48, 2),
fps_horiz_angle = AA(0x4A, 2),
fps_unk_angle = AA(0x4C, 2),
unk_4E = AA(0x4E, 2), -- padding?
unk_50 = AA(0x50, 2), -- automatically resets to 0?
unk_52 = AA(0x52, 2),
unk_54 = AA(0x54, 'f'), -- link: 500.0
x_scale = AA(0x58, 'f'), x_scale = AA(0x58, 'f'),
y_scale = AA(0x5C, 'f'), y_scale = AA(0x5C, 'f'),
z_scale = AA(0x60, 'f'), z_scale = AA(0x60, 'f'),
@ -20,10 +42,37 @@ function Actor(addr)
y_vel = AA(0x68, 'f'), y_vel = AA(0x68, 'f'),
z_vel = AA(0x6C, 'f'), z_vel = AA(0x6C, 'f'),
lin_vel_old = AA(0x70, 'f'), lin_vel_old = AA(0x70, 'f'),
unk_74 = AA(0x74, 'f'),
unk_78 = AA(0x78, 'f'),
unk_7C = AA(0x7C, 4),
unk_80 = AA(0x80, 4), -- pointer to ground?
unk_84 = AA(0x84, 4),
ground_y = AA(0x88, 'f'), ground_y = AA(0x88, 'f'),
unk_8C = AA(0x8C, 4),
unk_90 = AA(0x90, 4), -- collision flags?
unk_94 = AA(0x94, 4),
unk_98 = AA(0x98, 4),
unk_9C = AA(0x9C, 4),
damage_table = AA(0xA0, 4), damage_table = AA(0xA0, 4),
unk_A4 = AA(0xA4, 4),
unk_A8 = AA(0xA8, 4),
unk_AC = AA(0xAC, 4),
unk_B0 = AA(0xB0, 4),
unk_B4 = AA(0xB4, 1),
unk_B5 = AA(0xB5, 1),
unk_B6 = AA(0xB6, 1),
hp = AA(0xB7, 1), hp = AA(0xB7, 1),
angle = AA(0xBE, 2), unk_B8 = AA(0xB8, 4),
unk_BC = AA(0xBC, 2),
angle = AA(0xBE, 2), -- part of rotation struct?
unk_C0 = AA(0xC0, 4), -- enum?
unk_C4 = AA(0xC4, 'f'), -- float?
unk_C8 = AA(0xC8, 4), -- pointer?
unk_CC = AA(0xCC, 'f'), -- float?
unk_D0 = AA(0xD0, 1), -- single byte?
unk_D1 = AA(0xD1, 1), -- single byte?
unk_D2 = AA(0xD2, 1), -- single byte?
unk_D3 = AA(0xD3, 1), -- single byte?
foot_left_x = AA(0xD4, 'f'), -- tested on Link, may be other things foot_left_x = AA(0xD4, 'f'), -- tested on Link, may be other things
foot_left_y = AA(0xD8, 'f'), foot_left_y = AA(0xD8, 'f'),
foot_left_z = AA(0xDC, 'f'), foot_left_z = AA(0xDC, 'f'),
@ -34,9 +83,13 @@ function Actor(addr)
camera_rel_y = AA(0xF0, 'f'), camera_rel_y = AA(0xF0, 'f'),
camera_rel_z = AA(0xF4, 'f'), camera_rel_z = AA(0xF4, 'f'),
unknown_z = AA(0xF8, 'f'), unknown_z = AA(0xF8, 'f'),
unk_FC = AA(0xFC, 4),
unk_100 = AA(0x100, 4),
unk_104 = AA(0x104, 4),
x_old = AA(0x108, 'f'), x_old = AA(0x108, 'f'),
y_old = AA(0x10C, 'f'), y_old = AA(0x10C, 'f'),
z_old = AA(0x108, 'f'), z_old = AA(0x110, 'f'),
-- somewhere in here is u8 runActor?
prev = AA(0x128, 4), prev = AA(0x128, 4),
next = AA(0x12C, 4), next = AA(0x12C, 4),
} }

View file

@ -4,7 +4,7 @@ function Actor(addr)
return { return {
num = AA(0x0, 2), num = AA(0x0, 2),
type = AA(0x2, 1), type = AA(0x2, 1),
room_number = AA(0x3, 1), room_number = AA(0x3, 1), -- verify
flags = AA(0x4, 4), flags = AA(0x4, 4),
x_copy = AA(0x8, 'f'), x_copy = AA(0x8, 'f'),
y_copy = AA(0xC, 'f'), y_copy = AA(0xC, 'f'),
@ -16,13 +16,11 @@ function Actor(addr)
x = AA(0x24, 'f'), x = AA(0x24, 'f'),
y = AA(0x28, 'f'), y = AA(0x28, 'f'),
z = AA(0x2C, 'f'), z = AA(0x2C, 'f'),
--x_rot_init = AA(0x30, 2), x_rot_init_2 = AA(0x30, 2), -- z-target facing angle?
--y_rot_init = AA(0x32, 2), y_rot_init_2 = AA(0x32, 2), -- link's head Y rot (lerped FPS angle)
--z_rot_init = AA(0x34, 2), z_rot_init_2 = AA(0x34, 2),
--x_rot_init = AA(0x44, 2), fps_vert_angle = AA(0x44, 2),
--y_rot_init = AA(0x46, 2), fps_horiz_angle = AA(0x46, 2),
--z_rot_init = AA(0x48, 2),
angle_old = AA(0x4A, 2), -- TODO: verify
x_scale = AA(0x50, 'f'), x_scale = AA(0x50, 'f'),
y_scale = AA(0x54, 'f'), y_scale = AA(0x54, 'f'),
z_scale = AA(0x58, 'f'), z_scale = AA(0x58, 'f'),
@ -34,19 +32,6 @@ function Actor(addr)
damage_table = AA(0x98, 4), damage_table = AA(0x98, 4),
hp = AA(0xAF, 1), hp = AA(0xAF, 1),
--angle = AA(0xBA, 2), --angle = AA(0xBA, 2),
--foot_left_x = AA(0xD4, 'f'),
--foot_left_y = AA(0xD8, 'f'),
--foot_left_z = AA(0xDC, 'f'),
--foot_right_x = AA(0xE0, 'f'),
--foot_right_y = AA(0xE4, 'f'),
--foot_right_z = AA(0xE8, 'f'),
--camera_rel_x = AA(0xEC, 'f'),
--camera_rel_y = AA(0xF0, 'f'),
--camera_rel_z = AA(0xF4, 'f'),
--unknown_z = AA(0xF8, 'f'),
--x_old = AA(0x108, 'f'),
--y_old = AA(0x10C, 'f'),
--z_old = AA(0x108, 'f'),
prev = AA(0x120, 4), prev = AA(0x120, 4),
next = AA(0x124, 4), next = AA(0x124, 4),
} }
@ -172,8 +157,8 @@ return {
z_target_actor = AG(0x1CCC, 4), z_target_actor = AG(0x1CCC, 4),
link_actor = setmetatable({ link_actor = setmetatable({
--item_in_hand = AA(0x148, 1), item_in_hand = AA(0x142, 1),
animation_id = AA(0x1AE, 2), -- 0x1BE on debug? animation_id = AA(0x1AE, 2),
--link_flags = AA(0xA6C, 0xC), --link_flags = AA(0xA6C, 0xC),
lin_vel = AA(0x828, 'f'), lin_vel = AA(0x828, 'f'),
movement_angle = AA(0x82C, 2), movement_angle = AA(0x82C, 2),

View file

@ -27,7 +27,14 @@ return function(hash)
end end
return A(b.global + a, s) return A(b.global + a, s)
end end
function AA(a, s) return A(b.actor + a, s) end function AA(a, s)
if rv == 'O EUDB MQ' then
if a >= 0x130 then -- approximate
a = a + 0x10
end
end
return A(b.actor + a, s)
end
local subdir = version:sub(1, 1) local subdir = version:sub(1, 1)
local rvs = rv:sub(3) local rvs = rv:sub(3)