2018-04-02 07:29:12 -07:00
|
|
|
-- "gameconfig" is kind of a misnomer, to be honest.
|
|
|
|
-- it's more like things the end user shouldn't have to change.
|
|
|
|
|
2018-04-02 06:21:55 -07:00
|
|
|
local gcfg = {
|
|
|
|
input_size = 60 + 4, -- TODO: let the script figure this out for us.
|
|
|
|
tile_count = 17 * 13,
|
|
|
|
|
|
|
|
ok_routines = {
|
|
|
|
[0x4] = true, -- sliding down flagpole
|
|
|
|
[0x5] = true, -- end of level auto-walk
|
|
|
|
[0x7] = true, -- start of level auto-walk
|
|
|
|
[0x8] = true, -- normal (in control)
|
|
|
|
[0x9] = true, -- acquiring mushroom
|
|
|
|
[0xA] = true, -- losing big mario
|
|
|
|
[0xB] = true, -- uhh
|
|
|
|
[0xC] = true, -- acquiring fireflower
|
|
|
|
},
|
|
|
|
|
|
|
|
bad_states = {
|
|
|
|
power = true,
|
|
|
|
waiting_demo = true,
|
|
|
|
playing_demo = true,
|
|
|
|
unknown = true,
|
|
|
|
lose = true,
|
|
|
|
},
|
|
|
|
|
|
|
|
jp_lut = {
|
|
|
|
{ -- none
|
|
|
|
up = false, down = false, left = false, right = false,
|
|
|
|
select = false, start = false, B = false, A = false,
|
|
|
|
}, { -- A
|
|
|
|
up = false, down = false, left = false, right = false,
|
|
|
|
select = false, start = false, B = false, A = true,
|
|
|
|
}, { -- L
|
|
|
|
up = false, down = false, left = true, right = false,
|
|
|
|
select = false, start = false, B = false, A = false,
|
|
|
|
}, { -- R
|
|
|
|
up = false, down = false, left = false, right = true,
|
|
|
|
select = false, start = false, B = false, A = false,
|
|
|
|
}, { -- L + B
|
|
|
|
up = false, down = false, left = true, right = false,
|
|
|
|
select = false, start = false, B = true, A = false,
|
|
|
|
}, { -- R + B
|
|
|
|
up = false, down = false, left = false, right = true,
|
|
|
|
select = false, start = false, B = true, A = false,
|
|
|
|
}, { -- L + A
|
|
|
|
up = false, down = false, left = true, right = false,
|
|
|
|
select = false, start = false, B = false, A = true,
|
|
|
|
}, { -- R + A
|
|
|
|
up = false, down = false, left = false, right = true,
|
|
|
|
select = false, start = false, B = false, A = true,
|
|
|
|
}, { -- L + A + B
|
|
|
|
up = false, down = false, left = true, right = false,
|
|
|
|
select = false, start = false, B = true, A = true,
|
|
|
|
}, { -- R + A + B
|
|
|
|
up = false, down = false, left = false, right = true,
|
|
|
|
select = false, start = false, B = true, A = true,
|
|
|
|
}, { -- D
|
|
|
|
up = false, down = true, left = false, right = false,
|
|
|
|
select = false, start = false, B = false, A = false,
|
|
|
|
}, { -- D + A
|
|
|
|
up = false, down = true, left = false, right = false,
|
|
|
|
select = false, start = false, B = false, A = true,
|
|
|
|
}, { -- U
|
|
|
|
up = true, down = false, left = false, right = false,
|
|
|
|
select = false, start = false, B = false, A = false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
return setmetatable(gcfg, {
|
|
|
|
__index = function(t, n)
|
|
|
|
error("cannot use undeclared gameconfig '" .. tostring(n) .. "'", 2)
|
|
|
|
end
|
|
|
|
})
|