1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 08:19:03 -08:00
mm/Lua/addrs/O/common.lua

183 lines
6.2 KiB
Lua
Raw Normal View History

-- version-agnostic addresses
2015-03-17 14:58:07 -07:00
function Actor(addr)
local function AA(a, s) return A(addr+a, s) end
return {
num = AA(0x0, 2),
type = AA(0x2, 1),
room_number = AA(0x3, 1),
flags = AA(0x4, 4),
x_copy = AA(0x8, 'f'),
y_copy = AA(0xC, 'f'),
z_copy = AA(0x10, 'f'),
x_rot_init = AA(0x14, 2),
y_rot_init = AA(0x16, 2),
z_rot_init = AA(0x18, 2),
var = AA(0x1C, 2),
x = AA(0x24, 'f'),
y = AA(0x28, 'f'),
z = AA(0x2C, 'f'),
--x_rot_init = AA(0x30, 2),
--y_rot_init = AA(0x32, 2),
--z_rot_init = AA(0x34, 2),
--x_rot_init = AA(0x44, 2),
--y_rot_init = AA(0x46, 2),
--z_rot_init = AA(0x48, 2),
angle_old = AA(0x4A, 2), -- TODO: verify
x_scale = AA(0x50, 'f'),
y_scale = AA(0x54, 'f'),
z_scale = AA(0x58, 'f'),
x_vel = AA(0x5C, 'f'),
y_vel = AA(0x60, 'f'),
z_vel = AA(0x64, 'f'),
--lin_vel_old = AA(0x70, 'f'),
--ground_y = AA(0x88, 'f'),
2015-03-18 10:27:45 -07:00
damage_table = AA(0x98, 4),
hp = AA(0xAF, 1),
2015-03-17 14:58:07 -07:00
--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),
next = AA(0x124, 4),
}
end
return {
2015-03-17 14:58:07 -07:00
exit_value = AL(0x02, 2),
age_modifier = AL(0x04, 4),
2015-03-18 17:50:55 -07:00
cutscene_status = AL(0x0A, 2), -- "cutscene number" 0xFFFx
2015-03-17 14:58:07 -07:00
time = AL(0x0C, 2),
day_night = AL(0x10, 4),
--time_speed = AL(0x14, 4),
ZELDA3 = AL(0x1C, 6), -- actually ZELDAZ in OoT
death_count = AL(0x22, 2),
name = AL(0x24, 8),
max_hearts = AL(0x2E, 2),
hearts = AL(0x30, 2),
2015-03-18 17:50:55 -07:00
has_magic = AL(0x32, 1), -- ?
2015-03-17 14:58:07 -07:00
magic = AL(0x33, 1),
rupees = AL(0x34, 2),
2015-03-18 17:50:55 -07:00
navi_timer = AL(0x38, 2),
2015-03-17 14:58:07 -07:00
equip_tunic_boots = AL(0x70, 1),
equip_sword_shield = AL(0x71, 1),
inventory_items = AL(0x74, 24),
2015-03-18 17:50:55 -07:00
inventory_quantities= AL(0x8C, 24),
2015-03-17 14:58:07 -07:00
--magic_beans_avail = AL(0x9B, 1),
2015-03-18 17:50:55 -07:00
tunic_boots = AL(0x9C, 1),
sword_shield = AL(0x9D, 1),
upgrades = AL(0xA1, 3),
quest_items = AL(0xA4, 4),
2015-03-17 14:58:07 -07:00
--items_wft = AL(0xC0, 1),
--keys_wft = AL(0xCA, 1),
2015-03-18 17:50:55 -07:00
doubled_hearts = AL(0xCF, 1), -- set to 20 by the game
2015-03-17 14:58:07 -07:00
--strange_string = AL(0xDE, 6),
2015-03-18 17:50:55 -07:00
scene_flags_save = AL(0xD4, 0xB0C), -- 0x1C each
2015-03-17 14:58:07 -07:00
--slulltula_count_wf = AL(0xEC0, 2),
--archery = AL(0xF00, 1),
--disable_c_buttons = AL(0xF4A, 1), -- 8
--sword_disable_c = AL(0xF52, 1), -- 32
--map_visited = AL(0xF5E, 2),
--map_visible = AL(0xF62, 2),
inventory = {
2015-03-18 17:50:55 -07:00
b_button_item = AL(0x68, 1),
2015-03-17 14:58:07 -07:00
c_left_item = AL(0x69, 1),
c_down_item = AL(0x6A, 1),
c_right_item = AL(0x6B, 1),
c_left_slot = AL(0x6C, 1),
c_down_slot = AL(0x6D, 1),
c_right_slot = AL(0x6E, 1),
b_button_slot = AL(0x6F, 1), -- unused?
2015-03-18 10:27:45 -07:00
deku_stick = AL(0x74, 1),
deku_nut = AL(0x75, 1),
bombs = AL(0x76, 1),
bow = AL(0x77, 1),
fire_arrows = AL(0x78, 1),
dins_fire = AL(0x79, 1),
slingshot = AL(0x7A, 1),
ocarina = AL(0x7B, 1),
bombchu = AL(0x7C, 1),
hookshot = AL(0x7D, 1),
ice_arrows = AL(0x7E, 1),
farores_wind = AL(0x7F, 1),
boomerang = AL(0x80, 1),
lens_of_truth = AL(0x81, 1),
magic_beans = AL(0x82, 1),
hammer = AL(0x83, 1),
light_arrows = AL(0x84, 1),
nayrus_love = AL(0x85, 1),
2015-03-18 17:50:55 -07:00
bottle_1 = AL(0x86, 1),
bottle_2 = AL(0x87, 1),
bottle_3 = AL(0x88, 1),
bottle_4 = AL(0x89, 1),
trade_1 = AL(0x8A, 1),
trade_2 = AL(0x8B, 1),
2015-03-17 14:58:07 -07:00
},
quantities = {
2015-03-18 17:50:55 -07:00
sticks = AL(0x8C, 1),
nuts = AL(0x8D, 1),
bombs = AL(0x8E, 1),
arrows = AL(0x8F, 1),
seeds = AL(0x92, 1),
bombchu = AL(0x94, 1),
beans = AL(0x9A, 1),
2015-03-17 14:58:07 -07:00
},
2015-05-10 14:26:24 -07:00
buttons = AG(0x14, 2),
2015-04-15 22:39:36 -07:00
scene_number = AG(0xA4, 2),
2015-03-17 14:58:07 -07:00
camera_target = AG(0x270, 4),
2015-03-18 21:50:35 -07:00
2015-03-17 14:58:07 -07:00
actor_count = AG(0x1C2C, 1),
2015-03-18 21:50:35 -07:00
actor_counts = {
[0]=AG(0x1C30, 4),
AG(0x1C38, 4),
AG(0x1C40, 4),
AG(0x1C48, 4),
AG(0x1C50, 4),
AG(0x1C58, 4),
AG(0x1C60, 4),
AG(0x1C68, 4),
AG(0x1C70, 4),
AG(0x1C78, 4),
AG(0x1C80, 4),
AG(0x1C88, 4),
},
actor_firsts = {
[0]=AG(0x1C34, 4),
AG(0x1C3C, 4),
AG(0x1C44, 4),
AG(0x1C4C, 4),
AG(0x1C54, 4),
AG(0x1C5C, 4),
AG(0x1C64, 4),
AG(0x1C6C, 4),
AG(0x1C74, 4),
AG(0x1C7C, 4),
AG(0x1C84, 4),
AG(0x1C8C, 4),
},
2015-03-17 14:58:07 -07:00
z_cursor_actor = AG(0x1CC8, 4),
z_target_actor = AG(0x1CCC, 4),
link_actor = setmetatable({
--item_in_hand = AA(0x148, 1),
2015-05-10 14:26:24 -07:00
animation_id = AA(0x1AE, 2), -- 0x1BE on debug?
--link_flags = AA(0xA6C, 0xC),
2015-05-10 14:26:24 -07:00
lin_vel = AA(0x828, 'f'),
movement_angle = AA(0x82C, 2),
active_sword = AA(0x833, 1),
}, {__index = Actor(AA(0,0).addr)}),
2015-03-17 14:58:07 -07:00
}