More optimization, add constants file for eventual descructible scenery.

This commit is contained in:
Anna Rose Wiggins 2019-12-09 16:51:15 -05:00
parent 130c393c51
commit 3a9fac53f0
5 changed files with 52 additions and 6 deletions

45
constants.lua Normal file
View file

@ -0,0 +1,45 @@
-- unavoidable table lookups used by multiple files are stored here.
-- nothing in here should
-- be changed at runtime.
--
-- also has commented "fake constants" that are replaced by actual values, for
-- reference.
--
-- see index_map.md for more "constant" values
function init_constants()
-- block_size = 64
-- biome_size = 128
-- the indices here are sprite numbers.
object_interaction_map = {
-- tree
[4] = {
replacement = 14,
sfx = 11,
drop = 65
},
-- big mushroom
[8] = {
replacement = 16,
sfx = 12,
drop = 66
},
-- cactus w/ flower
[10] = {
replacement = 15,
sfx = 12,
drop = 68
},
-- cactus
[13] = {
replacement = 15,
sfx = 12,
drop = 67
}
}
end