diff --git a/main.lua b/main.lua index 3e11d62..73ce8d2 100644 --- a/main.lua +++ b/main.lua @@ -1,4 +1,5 @@ function _init() + init_sound() init_mapgen() init_player({block_size/2, block_size/2}) generate_map({0, 0}) diff --git a/sfx_map.md b/sfx_map.md new file mode 100644 index 0000000..912155c --- /dev/null +++ b/sfx_map.md @@ -0,0 +1,12 @@ +### sfx +--- +0 - noise effect for wind track (sfx 9) +1 - little bell + +8 - desert music 1 +9 - desert wind +10 - desert music 2 + +### patterns +--- +0-1 - desert bgm (loops on 1) diff --git a/sound.lua b/sound.lua new file mode 100644 index 0000000..f4a6362 --- /dev/null +++ b/sound.lua @@ -0,0 +1,8 @@ +-- Defines constants and plays music and sound effects + +function init_sound() + -- each name maps to a pattern number to play + music_map = { + desert = 0, + } +end