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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
rotation_offsets = { -- FIXME: not all of these are pixel-perfect.
|
|
|
|
0, -40, -- 0x00
|
|
|
|
6, -38,
|
|
|
|
15, -37,
|
|
|
|
22, -32,
|
|
|
|
28, -28,
|
|
|
|
32, -22,
|
|
|
|
37, -14,
|
|
|
|
39, -6,
|
|
|
|
40, 0, -- 0x08
|
|
|
|
38, 7,
|
|
|
|
37, 15,
|
|
|
|
33, 23,
|
|
|
|
27, 29,
|
|
|
|
22, 33,
|
|
|
|
14, 37,
|
|
|
|
6, 39,
|
|
|
|
0, 41, -- 0x10
|
|
|
|
-7, 40,
|
|
|
|
-16, 38,
|
|
|
|
-22, 34,
|
|
|
|
-28, 28,
|
|
|
|
-34, 23,
|
|
|
|
-38, 16,
|
|
|
|
-40, 8,
|
|
|
|
-40, -0, -- 0x18
|
|
|
|
-40, -6,
|
|
|
|
-38, -14,
|
|
|
|
-34, -22,
|
|
|
|
-28, -28,
|
|
|
|
-22, -32,
|
|
|
|
-16, -36,
|
|
|
|
-8, -38,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
return setmetatable(gcfg, {
|
|
|
|
__index = function(t, n)
|
|
|
|
error("cannot use undeclared gameconfig '" .. tostring(n) .. "'", 2)
|
|
|
|
end
|
|
|
|
})
|