diff --git a/mapgen.lua b/mapgen.lua index 6578c61..87059c6 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -120,4 +120,3 @@ function generate_map(start) end end end - diff --git a/sound.lua b/sound.lua index f4a6362..8bf1535 100644 --- a/sound.lua +++ b/sound.lua @@ -3,6 +3,13 @@ function init_sound() -- each name maps to a pattern number to play music_map = { - desert = 0, + desert = 0 } end + +-- call this once to initialize biome sound. +-- by convention channel 4 should always be the +-- preferred sfx channel, so we unmask it. +function play_biome_music(biome) + music(music_map[biome], 2000, 7) +end