Initial sound code.
This commit is contained in:
parent
0b10b2df67
commit
1153509631
3 changed files with 21 additions and 0 deletions
1
main.lua
1
main.lua
|
@ -1,4 +1,5 @@
|
|||
function _init()
|
||||
init_sound()
|
||||
init_mapgen()
|
||||
init_player({block_size/2, block_size/2})
|
||||
generate_map({0, 0})
|
||||
|
|
12
sfx_map.md
Normal file
12
sfx_map.md
Normal 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
8
sound.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue