From 42493fd48c6623ce70e0c0b11226316ff30f09d7 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 15 Nov 2015 08:05:33 -0800 Subject: [PATCH] OoT "compatibility" --- .gitignore | 3 ++- Lua/addrs/M/common.lua | 2 +- Lua/addrs/O/common.lua | 6 ++++++ Lua/cheat menu.lua | 15 ++++++++++++--- Lua/menus/progress.lua | 10 ++++++++++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 815965f..9a52c29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ lua chest test lua movement test -cheat menu.save.lua * - Copy* +cm oot save.lua +cm mm save.lua diff --git a/Lua/addrs/M/common.lua b/Lua/addrs/M/common.lua index d2c79f0..a700584 100755 --- a/Lua/addrs/M/common.lua +++ b/Lua/addrs/M/common.lua @@ -384,7 +384,7 @@ return { actor_disable = AG(0x18846, 2), warp_begin = AG(0x18875, 1), screen_dim = AG(0x18877, 1), - warp_destination = AG(0x1887A, 2), + warp_destination = AG(0x18878, 4), fade_type = AG(0x1887F, 1), entrance_entered = AG(0x18B48, 1), diff --git a/Lua/addrs/O/common.lua b/Lua/addrs/O/common.lua index 83bc60b..27ad5e3 100644 --- a/Lua/addrs/O/common.lua +++ b/Lua/addrs/O/common.lua @@ -125,6 +125,7 @@ return { voidout_var = AL(0x1376, 2), voidout_entrance = AL(0x1378, 2), voidout_room_number = AL(0x137A, 2), + buttons_enabled = AL(0x13E2, 4), -- lol unaligned access event_inf = AL(0x13FA, 0x8), magic_max = AL(0x13F4, 2), @@ -169,11 +170,16 @@ return { current_scene_flags_1 = AG(0x1D38, 4), -- chest flags current_scene_flags_3 = AG(0x1D3C, 4), -- room clear flags current_scene_flags_4 = AG(0x1D44, 4), -- collectible flags + cutscene_pointer = AG(0x1D68, 4), + cutscene_status_2 = AG(0x1D6C, 1), -- needs a rename -- somewhere around here should be visited room flags? room_number = AG(0x11CBC, 1), room_pointer = AG(0x11CC8, 4), age_modifier_global = AG(0x11DE8, 1), + warp_begin = AG(0x11E15, 1), + warp_destination = AG(0x11E18, 4), + fade_type = AG(0x11E1F, 1), -- TODO: verify link_actor = setmetatable({ item_in_hand = AA(0x142, 1), diff --git a/Lua/cheat menu.lua b/Lua/cheat menu.lua index 8ad5d2a..b85c18e 100755 --- a/Lua/cheat menu.lua +++ b/Lua/cheat menu.lua @@ -37,8 +37,8 @@ local run_while_paused = true local alt_input = true local eat_input = true -local fn = 'cheat menu.save.lua' -local saved = deserialize('cheat menu.save.lua') or {} +local fn = oot and 'cm oot save.lua' or 'cm mm save.lua' +local saved = deserialize(fn) or {} local function save() serialize(fn, saved) end @@ -113,6 +113,7 @@ end local soft_reset = Callbacks() function soft_reset:on() + if oot then return end addrs.warp_begin(0x14) addrs.warp_destination(0x1C00) addrs.fade_type(0x0B) @@ -220,7 +221,15 @@ function kill_fades:on() fades_killed = true end -local time_menu = Menu{ +local time_menu = oot and Menu{ + Screen{ + Text("Time Menu #1/1"), + Text("Unimplemented for OoT."), + Text("Sorry! Try again later."), + Text(""), + Back(), + }, +} or Menu{ Screen{ Text("Day/Time Menu #1/1"), Oneshot("Set Day to Zeroth", Setter{[addrs.day]=0, [addrs.days_elapsed]=0}), diff --git a/Lua/menus/progress.lua b/Lua/menus/progress.lua index 2aa5cb3..b3425f1 100644 --- a/Lua/menus/progress.lua +++ b/Lua/menus/progress.lua @@ -1,3 +1,13 @@ +if oot then return Menu{ + Screen{ + Text("Progress Menu #1/1"), + Text("Unimplemented for OoT."), + Text("Sorry! Try again later."), + Text(""), + Back(), + }, +} end + local first_cycle = Callbacks() function first_cycle:on() addrs.warp_begin(0x14)