diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/objs/specks.lua | 3 | ||||
| -rw-r--r-- | src/objs/tilemap.lua | 2 | ||||
| -rw-r--r-- | src/sound.lua | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/objs/specks.lua b/src/objs/specks.lua index dd14a59..16fe021 100644 --- a/src/objs/specks.lua +++ b/src/objs/specks.lua @@ -1,9 +1,6 @@ Speck_Sys = {} Speck_Sys.__index = Speck_Sys - - - local SPAWN_FUNCTIONS = { Rectangle = function (speck_sys) local w = (speck_sys.spawn_width or 0) / 2 diff --git a/src/objs/tilemap.lua b/src/objs/tilemap.lua index 6838d95..96a1247 100644 --- a/src/objs/tilemap.lua +++ b/src/objs/tilemap.lua @@ -146,7 +146,7 @@ end function set_tile(map, x, y, tileid) if map.tiledata[ID(map, x, y)] == 0 then - play_sound("res/sound/thud.mp3") + play_sound("res/sound/thud.ogg") end map.tiledata[ID(map, x, y)] = tileid map.needs_rebuild = true diff --git a/src/sound.lua b/src/sound.lua index 4d31861..6ebe403 100644 --- a/src/sound.lua +++ b/src/sound.lua @@ -16,12 +16,14 @@ function load_sounds_from(path) size = 1, [1] = la.newSource(filepath, "static"), } + sound_bank[filepath][1]:setRelative(true) + sound_bank[filepath][1]:setPosition(0, 0, 0) end end end end -function play_sound(path) +function play_sound(path, x, y) sound = sound_bank[path] local source = nil @@ -35,5 +37,6 @@ function play_sound(path) sound[sound.size] = sound[1]:clone() source = sound[sound.size] end + source:setPosition(x or 0, y or 0, 0) la.play(source) end |
