mirror of
https://github.com/notwa/mm
synced 2024-11-05 06:39:02 -08:00
190 lines
6.7 KiB
Lua
Executable file
190 lines
6.7 KiB
Lua
Executable file
-- version-agnostic addresses
|
|
function merge(t1, t2)
|
|
for k, v in pairs(t1) do
|
|
t2[k] = v
|
|
end
|
|
return t2
|
|
end
|
|
|
|
function Actor(addr)
|
|
local function AA(a, s) return A(addr+a, s) end
|
|
return {
|
|
num = AA(0x0, 2),
|
|
type = AA(0x2, 1),
|
|
flags = AA(0x4, 4),
|
|
x_copy = AA(0x8, 'f'),
|
|
y_copy = AA(0xC, 'f'),
|
|
z_copy = AA(0x10, 'f'),
|
|
var = AA(0x1C, 2),
|
|
x = AA(0x24, 'f'),
|
|
y = AA(0x28, 'f'),
|
|
z = AA(0x2C, 'f'),
|
|
angle_old = AA(0x4A, 2),
|
|
x_scale = AA(0x58, 'f'),
|
|
y_scale = AA(0x5C, 'f'),
|
|
z_scale = AA(0x60, 'f'),
|
|
x_vel = AA(0x64, 'f'),
|
|
y_vel = AA(0x68, 'f'),
|
|
z_vel = AA(0x6C, 'f'),
|
|
lin_vel_old = AA(0x70, 'f'),
|
|
ground_y = AA(0x88, 'f'),
|
|
damage_table = AA(0xA0, 4),
|
|
hp = AA(0xB7, 1),
|
|
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(0x128, 4),
|
|
next = AA(0x12C, 4),
|
|
}
|
|
end
|
|
|
|
return {
|
|
link = A(link, 0x4000),
|
|
area_mod = AL(0x02, 2),
|
|
cutscene_status = AL(0x0A, 2),
|
|
time = AL(0x0C, 2),
|
|
time_speed = AL(0x16, 2),
|
|
day = AL(0x1B, 1),
|
|
transformation = AL(0x20, 1),
|
|
zeroth_day = AL(0x23, 1),
|
|
sot_count = AL(0x2A, 2),
|
|
name = AL(0x2C, 8),
|
|
max_hearts = AL(0x34, 2),
|
|
hearts = AL(0x36, 2),
|
|
magic_1 = AL(0x39, 1),
|
|
rupees = AL(0x3A, 2),
|
|
magic_2 = AL(0x40, 2),
|
|
owls_hit = AL(0x46, 2),
|
|
sword_shield = AL(0x6D, 1),
|
|
inventory_items = AL(0x70, 24),
|
|
inventory_masks = AL(0x88, 24),
|
|
inventory_counts = AL(0xA0, 24),
|
|
wallet_flags = AL(0xBA, 1),
|
|
quiver_bag = AL(0xBB, 1),
|
|
status_items = AL(0xBD, 3),
|
|
scene_flags_save = AL(0x470, 0x960),
|
|
area_map = AL(0xEB2, 1),
|
|
banked_rupees = AL(0xEDE, 2),
|
|
archery = AL(0xF00, 1),
|
|
chateau_romani = AL(0xF06, 1),
|
|
disable_c_buttons = AL(0xF4A, 1),
|
|
sword_disable_c = AL(0xF52, 1),
|
|
map_visited = AL(0xF5E, 2),
|
|
map_visible = AL(0xF62, 2),
|
|
|
|
inventory = {
|
|
b_button = AL(0x4C, 1),
|
|
|
|
ocarina = AL(0x70, 1),
|
|
bow = AL(0x71, 1),
|
|
fire_arrows = AL(0x72, 1),
|
|
ice_arrows = AL(0x73, 1),
|
|
light_arrows = AL(0x74, 1),
|
|
event_1 = AL(0x75, 1),
|
|
bombs = AL(0x76, 1),
|
|
bombchu = AL(0x77, 1),
|
|
deku_stick = AL(0x78, 1),
|
|
deku_nut = AL(0x79, 1),
|
|
magic_beans = AL(0x7A, 1),
|
|
event_2 = AL(0x7B, 1),
|
|
powder_keg = AL(0x7C, 1),
|
|
pictograph = AL(0x7D, 1),
|
|
lens_of_truth = AL(0x7E, 1),
|
|
hookshot = AL(0x7F, 1),
|
|
fairy_sword = AL(0x80, 1),
|
|
event_3 = AL(0x81, 1),
|
|
bottle_1 = AL(0x82, 1),
|
|
bottle_2 = AL(0x83, 1),
|
|
bottle_3 = AL(0x84, 1),
|
|
bottle_4 = AL(0x85, 1),
|
|
bottle_5 = AL(0x86, 1),
|
|
bottle_6 = AL(0x87, 1),
|
|
},
|
|
masks = {
|
|
postman = AL(0x88, 1),
|
|
all_night = AL(0x89, 1),
|
|
blast = AL(0x8A, 1),
|
|
stone = AL(0x8B, 1),
|
|
great_fairy = AL(0x8C, 1),
|
|
deku = AL(0x8D, 1),
|
|
keaton = AL(0x8E, 1),
|
|
bremen = AL(0x8F, 1),
|
|
bunny = AL(0x90, 1),
|
|
don_gero = AL(0x91, 1),
|
|
scents = AL(0x92, 1),
|
|
goron = AL(0x93, 1),
|
|
romani = AL(0x94, 1),
|
|
troupe_leader = AL(0x95, 1),
|
|
kafei = AL(0x96, 1),
|
|
couples = AL(0x97, 1),
|
|
truth = AL(0x98, 1),
|
|
zora = AL(0x99, 1),
|
|
kamaro = AL(0x9A, 1),
|
|
gibdo = AL(0x9B, 1),
|
|
garos = AL(0x9C, 1),
|
|
captains = AL(0x9D, 1),
|
|
giants = AL(0x9E, 1),
|
|
fierce_deity = AL(0x9F, 1),
|
|
},
|
|
counts = {
|
|
arrows = AL(0xA1, 1),
|
|
bombs = AL(0xA6, 1),
|
|
bombchu = AL(0xA7, 1),
|
|
sticks = AL(0xA8, 1),
|
|
nuts = AL(0xA9, 1),
|
|
beans = AL(0xAA, 1),
|
|
kegs = AL(0xAC, 1),
|
|
},
|
|
|
|
buttons_1 = AG(0x1A, 1),
|
|
buttons_2 = AG(0x1B, 1),
|
|
framerate_limiter = AG(0xA2, 1),
|
|
camera_target = AG(0x2B0, 4),
|
|
actor_count_0 = AG(0x1CB0, 4),
|
|
actor_first_0 = AG(0x1CB4, 4),
|
|
actor_count_1 = AG(0x1CBC, 4),
|
|
actor_first_1 = AG(0x1CC0, 4),
|
|
actor_count_2 = AG(0x1CC8, 4),
|
|
actor_first_2 = AG(0x1CCC, 4),
|
|
actor_count_3 = AG(0x1CD4, 4),
|
|
actor_first_3 = AG(0x1CD8, 4),
|
|
actor_count_4 = AG(0x1CE0, 4),
|
|
actor_first_4 = AG(0x1CE4, 4),
|
|
actor_count_5 = AG(0x1CEC, 4),
|
|
actor_first_5 = AG(0x1CF0, 4),
|
|
actor_count_6 = AG(0x1CF8, 4),
|
|
actor_first_6 = AG(0x1CFC, 4),
|
|
actor_count_7 = AG(0x1D04, 4),
|
|
actor_first_7 = AG(0x1D08, 4),
|
|
actor_count_8 = AG(0x1D10, 4),
|
|
actor_first_8 = AG(0x1D14, 4),
|
|
actor_count_9 = AG(0x1D1C, 4),
|
|
actor_first_9 = AG(0x1D20, 4),
|
|
actor_count_10 = AG(0x1D28, 4),
|
|
actor_first_10 = AG(0x1D2C, 4),
|
|
actor_count_11 = AG(0x1D34, 4),
|
|
actor_first_11 = AG(0x1D38, 4),
|
|
bomb_counter = AG(0x1CD4, 1),
|
|
z_cursor_actor = AG(0x1DF8, 4),
|
|
z_target_actor = AG(0x1DFC, 4),
|
|
|
|
link_actor = merge(Actor(AA(0,0).addr), {
|
|
item_in_hand = AA(0x148, 1),
|
|
animation_id = AA(0x24A, 2),
|
|
link_flags = AA(0xA6C, 0xC),
|
|
lin_vel = AA(0xAD0, 'f'),
|
|
movement_angle = AA(0xAD4, 2),
|
|
active_sword = AA(0xADB, 1),
|
|
}),
|
|
}
|