2019-12-09 01:43:32 +00:00
|
|
|
-- Defines constants and plays music and sound effects
|
|
|
|
|
|
|
|
function init_sound()
|
|
|
|
-- each name maps to a pattern number to play
|
|
|
|
music_map = {
|
2019-12-09 19:54:09 +00:00
|
|
|
desert = 0
|
2019-12-09 01:43:32 +00:00
|
|
|
}
|
|
|
|
end
|
2019-12-09 19:54:09 +00:00
|
|
|
|
|
|
|
-- 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
|