mirror of
https://github.com/notwa/mm
synced 2024-11-05 15:59:03 -08:00
reorganize scripts
This commit is contained in:
parent
1128998b96
commit
d0ccf16dff
67 changed files with 38 additions and 27 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,6 +1,5 @@
|
|||
lua chest test
|
||||
lua movement test
|
||||
* - Copy*
|
||||
cm oot save.lua
|
||||
cm mm save.lua
|
||||
__pycache__/*
|
||||
*.State
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "classes"
|
||||
|
@ -37,7 +37,7 @@ local run_while_paused = true
|
|||
local alt_input = true
|
||||
local eat_input = true
|
||||
|
||||
local fn = oot and 'cm oot save.lua' or 'cm mm save.lua'
|
||||
local fn = oot and 'data/cm oot save.lua' or 'data/cm mm save.lua'
|
||||
local saved = deserialize(fn) or {}
|
||||
local function save()
|
||||
serialize(fn, saved)
|
||||
|
@ -258,7 +258,7 @@ local main_menu = Menu{
|
|||
Toggle("Infinite Items", infinite_items),
|
||||
Toggle("Use Any Item", any_item),
|
||||
Text(""),
|
||||
Oneshot("Have Everything", Setter{[dofile]="oneshot.lua"}),
|
||||
Oneshot("Have Everything", Setter{[dofile]="setup hundred.lua"}),
|
||||
LinkTo("Set Progress...", progress_menu),
|
||||
Text(""),
|
||||
Oneshot("Escape Cutscene", Setter{[addrs.cutscene_status_2]=3}),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "messages"
|
||||
local assemble = require "inject.lips"
|
||||
local assemble = require "lips"
|
||||
|
||||
local injection_points = {
|
||||
['M US10'] = {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
_require = _require or require
|
||||
if _require then return end
|
||||
_require = require
|
||||
|
||||
local function dumbdepend(path)
|
||||
package.path = package.path..';./lib/?.lua'
|
||||
|
||||
function depend(path)
|
||||
if package and package.loaded and package.loaded[path] then
|
||||
package.loaded[path] = nil
|
||||
end
|
||||
-- TODO: pcall?
|
||||
return _require(path)
|
||||
end
|
||||
|
||||
return dumbdepend
|
|
@ -1,4 +1,4 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "messages"
|
|
@ -1,4 +1,5 @@
|
|||
require "boilerplate"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "classes"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
-- use with inject.lua on O EUDB MQ
|
||||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
|
||||
local buffer = 0x700070
|
|
@ -1,4 +1,4 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "messages"
|
|
@ -1,4 +1,4 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "messages"
|
|
@ -1,4 +1,4 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
require = require "depend"
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "messages"
|
|
@ -1,3 +1,4 @@
|
|||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "messages"
|
||||
|
@ -43,7 +44,7 @@ function dump_room(start, addr)
|
|||
|
||||
local dumpy = function()
|
||||
local bank = R1(addr+4)
|
||||
local offset = R3(addr+5)
|
||||
local offset = bit.band(R4(addr+4), 0xFFFFFF)
|
||||
if bank ~= 3 then
|
||||
printf(" in bank %i at %06X", bank, offset)
|
||||
return
|
||||
|
@ -165,7 +166,7 @@ function dump_room(start, addr)
|
|||
local addr = alt_header_list
|
||||
while R1(addr) == 0x03 do
|
||||
printf("# setup: %02X", setups)
|
||||
dump_room(start, start + R3(addr+1))
|
||||
dump_room(start, start + bit.band(R4(addr), 0xFFFFFF))
|
||||
addr = addr + 4
|
||||
setups = setups + 1
|
||||
end
|
|
@ -1,3 +1,4 @@
|
|||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
require "addrs.init"
|
||||
require "classes"
|
|
@ -1,7 +1,9 @@
|
|||
-- gimme gimme gimme
|
||||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
local a = require "addrs.init"
|
||||
|
||||
-- gimme gimme gimme
|
||||
|
||||
local iv
|
||||
if version == "M JP10" or version == "M JP11" then
|
||||
iv = require "data.item values early"
|
|
@ -1,3 +1,4 @@
|
|||
require "lib.setup"
|
||||
require "boilerplate"
|
||||
local a = require "addrs.init"
|
||||
local inv = a.inventory
|
||||
|
@ -91,9 +92,15 @@ a.spider_mask_order[3](0) -- red
|
|||
a.spider_mask_order[4](1) -- blue
|
||||
a.spider_mask_order[5](0) -- red
|
||||
a.spider_mask_order[6](1) -- blue
|
||||
a.lottery_numbers[1](0x010203)
|
||||
a.lottery_numbers[2](0x040506)
|
||||
a.lottery_numbers[3](0x070809)
|
||||
a.lottery_numbers[1][1](1)
|
||||
a.lottery_numbers[1][2](2)
|
||||
a.lottery_numbers[1][3](3)
|
||||
a.lottery_numbers[2][1](4)
|
||||
a.lottery_numbers[2][2](5)
|
||||
a.lottery_numbers[2][3](6)
|
||||
a.lottery_numbers[3][1](7)
|
||||
a.lottery_numbers[3][2](8)
|
||||
a.lottery_numbers[3][3](9)
|
||||
a.epona_scene(53)
|
||||
a.epona_x(-1420)
|
||||
a.epona_y(257)
|
|
@ -8,7 +8,7 @@ local versions = {
|
|||
local version = versions[hash]
|
||||
|
||||
local index = 0
|
||||
local fn = 'lua chest test'
|
||||
local fn = 'data/lua chest test.State'
|
||||
|
||||
local start, ours, text
|
||||
if version == 'US10' then
|
||||
|
|
|
@ -64,7 +64,7 @@ local link = addrs.link_actor
|
|||
local pos = mm and {2400, 20, 375} or {-200, -40, 2330}
|
||||
local angle = 180
|
||||
|
||||
local fn = 'lua movement test'
|
||||
local fn = 'data/lua movement test.State'
|
||||
|
||||
function pythag(x, y)
|
||||
return math.sqrt(x*x + y*y)
|
Loading…
Reference in a new issue