Initial sound code.

This commit is contained in:
Anna Rose 2019-12-08 20:43:32 -05:00
parent 0b10b2df67
commit 1153509631
3 changed files with 21 additions and 0 deletions

View File

@ -1,4 +1,5 @@
function _init() function _init()
init_sound()
init_mapgen() init_mapgen()
init_player({block_size/2, block_size/2}) init_player({block_size/2, block_size/2})
generate_map({0, 0}) generate_map({0, 0})

12
sfx_map.md Normal file
View File

@ -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)

8
sound.lua Normal file
View File

@ -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